feat: make downloads working better for Debian and macOS users

Users with a recent Mac (starting from the M1 machines) get the wrong macOS binary. Therefore, raising issues in JabRef repo again and again and binding our spare development resources. - Example: https://github.com/JabRef/jabref/issues/11082
The underlying issue is https://github.com/JabRef/JabRefOnline/issues/2176. There was a fix attempt made (https://github.com/JabRef/JabRefOnline/issues/2176#issuecomment-1687012154), but it was rejected in favor of a "far better" solution (https://github.com/JabRef/JabRefOnline/issues/2176#issuecomment-1688953053). However, no one implemented this.
I perceive that we upset users and force some users to stay at old versions. Our JabRef strategy (since about 10 years) is to "force" users to update to a new version - and make this transition smooth.
Thus, we should get the "quick fix" in - and work on a "perfect" fix later on.

Users with a recent Mac (starting from the M1 machines) get the wrong macOS binary. Therefore, raising issues in JabRef repo again and again and binding our spare development resources. - Example: JabRef/jabref#11082

I think it would be good to detect this on the start of JabRef and report an error. Even if the download link redirects to the general fosshub page you are bound to have users that download the wrong binary.

Thus, we should get the "quick fix" in - and work on a "perfect" fix later on.

Note that this "quick fix" is a regression for everyone not having a new mac system.
If you don't want to work on the redesigned download interface (which I can understand), a "good enough" solution for now would be the following:

In https://github.com/JabRef/JabRefOnline/blob/947af7d7e9eaaec9f74cc1492bf86f01186fce2c/composables/downloads.ts#L1, add special handling of macos. Namely,
navigator.userAgent.match(/OS X 10_([789]|1[01234])/) then its not arm (since silicon exists only with 10_5 or higher)
navigator.userAgentData.getHighEntropyValues exists, then use it to obtain the architecture  (this should work on modern chrome browsers
fallback to generic download url

OK, a PR might be considered "unsecure", but I don't understand why a branch from the same repository is considered unsecure.

Good suggestion. Happy to receive a PR.

Note that this "quick fix" is a regression for everyone not having a new mac system.

Yes, but the download used to work before. Even with a click more.
Sometimes one needs to accept a step back to get things working.

If you don't want to work on the redesigned download interface (which I can understand), a "good enough" solution for now would be the following:

Thank you for understanding the challenge of addressing the redesigned download interface at this moment. Our immediate focus is on supporting our GSoC students and addressing bugs in JabRef. This prioritization allows us to ensure the stability and functionality of JabRef, benefiting our user community at large.
I acknowledge the importance of the download interface and the need for a solution that does not hinder user experience or contribute to users staying on outdated versions. Our goal has always been to facilitate a seamless transition to new versions, emphasizing user satisfaction and engagement.
I am aware of the concerns regarding macOS users and the potential impact on their experience. Addressing this issue remains a priority, and we aim to implement a temporary solution promptly. A more comprehensive fix will be explored as soon as our current commitments allow for additional bandwidth.
The feedback regarding FOSShub and the observed decrease in download numbers is being taken seriously. It underscores the necessity of a swift response to maintain trust and satisfaction within our community.
We are committed to implementing a "quick fix" to immediately address the most pressing concerns, with plans to develop and apply a more refined solution in the future. Your patience and understanding as we navigate these challenges are greatly appreciated.

Normally, x86 programs work on Mac arm as well, they just use Rosetta emulation. However, seems to be problematic with java/javafx and performance wise degraded.
And linux users will also need to choose the right one for their system.

Closing this due to inactivity :zzz:

@tobiasdiez Please help us to get this fixed. Please provide a workaround for https://github.com/JabRef/JabRefOnline/issues/2176
We can implement a good solution if someone of us has time. We need a workaround to keep users. I think, one reason they switch to Zotero is the WTF download

https://star-history.com/#JabRef/jabref&zotero/zotero&Date

@tobiasdiez Please help us to get this fixed. Please provide a workaround for #2176

I've already described a possible workaround in https://github.com/JabRef/JabRefOnline/pull/2359#issuecomment-2020091118. I don't have a mac so I'll not work on this myself.

I think, one reason they switch to Zotero is the WTF download

Well, the difference in users just comes from the fact that Zotero is open to every scientific field, while JabRef's limited scope as a bibtex editor only appeals to very few people in STEM - and even then, some of them just don't care about "correct" bibtex and are perfectly fine with whatever output they get from zotero + better bibtex. If you want to have more users, then just reduce the emphasize on bibtex and make jabref a more general reference manager that just happens to use bibtex as the backend.

I've already described a possible workaround in #2359 (comment)

There is no Linux in that workaround. Can you please add it and then roll out the fix?


Small error with context.md

Line 25 actually you want to write "are familiar", is that right?

I can see the confusion here, but I think "aren't" is the correct word. This section of the docs is basically saying- "don't use context before you've become familiar with other, existing options because those options probably work better for what you're doing anyway" 😄


ASP NET Core 2 Could not load assembly of a class library project

In my solution, I have two projects. One of them is web project and the other one is Model project. You can see my solution structure in below:

Now when I wanna run Add-Migration command in Model Project I get the following error message:

Could not load assembly 'ContosoUniversity.Model'. Ensure it is referenced by the startup project 'ContosoUniversity'.

I remove ContosoUniversity.Model reference from ContosoUniversity web project and add it again but I still get the same error.
I use ASP NET Core 2 and VS17.
Here is my Startup.cs class if you need it:
public class Startup
{
    public Startup(IConfiguration configuration, IHostingEnvironment env)
    {
        Configuration = configuration;

        var builder = new ConfigurationBuilder()
        .SetBasePath(env.ContentRootPath)
        .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
        .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);

        Configuration = builder.Build();
    }

    public IConfiguration Configuration { get; }

    // This method gets called by the runtime. Use this method to add services to the container.
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddDbContext<SchoolContext>(option =>
            option.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
        services.AddMvc();

    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
            app.UseBrowserLink();
        }
        else
        {
            app.UseExceptionHandler("/Home/Error");
        }

        app.UseStaticFiles();

        app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");
        });
    }
}

you can see this question in stackoverflow

Why is it an assembly reference instead of a project reference?

This issue is being closed because it has not been updated in 3 months.
We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.


Issue on status if all is offline

i edit code to add this ::
if (output === '') {             output = 'All processes offline';             result = 'CRITICAL';         }
instead of if (output === '') output = 'All processes online';
Best regards

@floppy84 thanks, I need this fix as well


[confcom] Updating katapolicygen to support new node image

Also updating tests to use images hosted on MCR instead of Docker Hub
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az confcom
General Guidelines

[x] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[x] Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
[x] My extension version conforms to the Extension version schema

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

confcom


Update facebook verification

Fixing a small issue in the OAuth redirect loop. sha256 was being passed as the challenge_type instead of S256, and instead of complaining, Facebook was just defaulting to plain. This should have failed, except there was also an error in what we were passing to Facebook in the "exchange" phase, such that the challenge and verifier ended up being what Facebook would expect in the "plain" case 🤕
This fix corrects the generation process so that challenge = sha(verifier), verifier=sha(nonce+salt), and nonce—not verifier*—is passed to Facebook as the state param. It then fixes challenge_type to S256 so that the whole thing gets verified correctly by Facebook.

Wrong target branch


Change size of the Label text

Sometimes the size of the label text is too big and take two lines so when the edit text has the focus it animate to the top it still taking two lines but now there are enough space to fill it in one line

You can use getFloatingLabel() then customize it.

But why it's too big..?
Can you provide screenshot?

Hi.

Well... this much information is improper to be put in the label as it would drastically worsen the user experience... You should try to use a hint instead.
Yet if you insist to do so, you can use getFloatingLabel().setMaxLines(1) to force it to stay in a line :)

I'm complete agree with you but is there any chance to change the size of the label when the Edit text has not the focus.

Did customizing  getFloatingLabel() work?


Addresses #366

This fix addresses #366
Description

Input point needs to be projected to Web Mercator in order for the tool to run successfully.
Related Issue

Addresses #366
Motivation and Context

Addresses #366
How Has This Been Tested?

Tested in ArcGIS Pro 2.2
Screenshots (if appropriate):

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.

@kgonzago - I pulled from your branch and ran the "Create GRG From Point" tool in the Military Tools.pyt (at C:\Users[username]\Documents\GitHub\military-tools-geoprocessing-toolbox\Geoprocessing) on a map using WGS84, using an input point feature (feature set tool) and 5x5 100x100 meter grid, 33 degree rotation.
I got:
Start Time: Friday, July 6, 2018 1:49:24 PM
Running script CreateGRGFromPoint...
App environment: ARCGIS_PRO
Creating Fishnet Grid
Sorting the grid for labeling
Adding field for labeling the grid
Numbering the grids
 returned NULL without setting an error
Completed script Create GRG From Point...
Failed to execute (CreateGRGFromPoint).
Failed at Friday, July 6, 2018 1:49:29 PM (Elapsed Time: 5.05 seconds)

@BobBooth I tested the fix with several scenarios the past day and with @csmoore's help determined the tool will work in a projected coordinate system. The tool assumes user's will work in a projected coordinate system since all the logic to create a GRG are in meters. This is issue will need to be further discussed with the team. Putting this temporarily on hold.

@topowright do we need this PR anymore, or can we close it? #366 says you have a newer fix

Looking closer at issue #366 there are two issues trying to be addressed. The first issue is grid rotation with a web auxiliary sphere projection. This PR fixes this issue.
The second issue is the tool does not work with any other projection or coordinate system in ArcGIS Pro. That might have been a mistake during the design process. I have opened another issue to capture that fix that is needed.


in windows 7 it's ok,but in linux(including mac), report some errors.

Do you have write permissions to the destination directory?
On Thu, Sep 8, 2016, 11:24 AM priscillapan<EMAIL_ADDRESS>wrote:

document-output is the output directory. it's also the gulp task name.
errors are:
Starting 'document-output'...
[17:26:55] Finished 'document-output' after 59 ms
internal/child_process.js:298
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:870:11)
at ChildProcess.spawn (internal/child_process.js:298:11)
at exports.spawn (child_process.js:362:9)
at /home/project/node_modules/gulp-jsdoc3/dist/gulp-jsdoc.js:112:121
at /home/project/node_modules/graceful-fs/graceful-fs.js:104:5
at FSReqWrap.oncomplete (fs.js:82:15)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gulpjs/gulp/issues/1794, or mute the thread
https://github.com/notifications/unsubscribe-auth/AGmW1j1kDO0NEJHKHjDbu0CwbuTB8R5uks5qn9RfgaJpZM4J3yPW
.

in Mac, sudo gulp document-output, the same error occured. i'v checked the directory it's trying to write, it has w/r right
internal/child_process.js:298
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:870:11)
at ChildProcess.spawn (internal/child_process.js:298:11)
at exports.spawn (child_process.js:362:9)
at /home/project/node_modules/gulp-jsdoc3/dist/gulp-jsdoc.js:112:121
at /home/project/node_modules/graceful-fs/graceful-fs.js:104:5
at FSReqWrap.oncomplete (fs.js:82:15)


Slight Inconsistent Delay When Starting Up pd.exe

So sometimes when I start up pd.exe in Windows 10 after the latest build, there is a slight delay before the game starts, other times it starts up in seconds. I wonder what is causing this new bug?

As long as it's not above 5 seconds, it is not a bug. Slight variation in startup time is also normal.


CI: TestBPF fails with "-bpf-test-path is a required flag" in runtime DatapathPrivilegedUnitTests

 [09:02:19]     bpf_test.go:56: -bpf-test-path is a required flag
 [09:02:19] --- FAIL: TestBPF (0.00s)
 [09:02:19] FAIL
 [09:02:19] coverage: 6.2% of statements
 [09:02:19] FAIL	github.com/cilium/cilium/test/bpf_tests	0.037s

Started failing consistently on master after https://github.com/cilium/cilium/pull/22043
Latest failure on master: https://jenkins.cilium.io/job/cilium-master-runtime-kernel-net-next/5238/

Also see discussion here: https://github.com/cilium/cilium/pull/22043#issuecomment-1307887505


Troubleshooting section not present

Describe the bug
This section is shown in the table of content but does not exist: Troubleshooting
Expected behavior
The section should not be shown in the table of content if it does not exist.

Thank you for reporting this issue. I have removed Troubleshooting header.


Roll engine 4b9966f5cb41..c3bc5d8dc7a3 (5 commits)

https://github.com/flutter/engine/compare/4b9966f5cb41...c3bc5d8dc7a3
git log 4b9966f5cb412a73fa50462b3aee9082f436a62a..c3bc5d8dc7a337997dd79fcd08d67bb9b8e61e2d --no-merges --oneline
c3bc5d8dc Roll src/third_party/skia 2c2240f66805..067861e14821 (6 commits) (flutter/engine#8636)
c6400e2c2 Merge runtime lifecycle unittests into the base test target. (flutter/engine#8634)
763bbca0c Add support for authentication codes via MDNS on iOS (flutter/engine#8625)
57f8abb73 Avoid leaking the VM in the shell unittests and assert VM state in existing tests. (flutter/engine#8628)
edef8bb8b Reland elevation test (flutter/engine#8633)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (cbracken@google.com), and stop
the roller if necessary.

AutoRoller is stopped; closing the active roll.


Add weights(::AbstractITensorNetwork)

Also add examples for Graphs.jl functionality implemented in https://github.com/mtfishman/NamedGraphs.jl/pull/20 and https://github.com/mtfishman/DataGraphs.jl/pull/10.

weights(tn::AbstractITensorNetwork) is defined as log2(dim(commoninds(tn, edge))) for each edge in edges(tn), and are stored in a Dictionary. This is the same definition used in https://arxiv.org/abs/2209.02895. This makes sense in the limit when dim(commoninds(tn, edge)) == 1, then the tensors are not connected and by this definition the weight is zero. Users can of course use their own function to compute weights for particular use cases, and pass the weights as necessary into graph functions that will use them.
@LinjianMa I think this is also what you are using?

yes this is the one I’m using
On Wed, Dec 21, 2022 at 10:50 Matt Fishman @.***> wrote:

weights(tn::AbstractITensorNetwork) is defined as log2(dim(commoninds(tn,
edge))) for each edge in edges(tn), and are stored in a Dictionary. This
is the same definition used in https://arxiv.org/abs/2209.02895. This
makes sense in the limit when dim(commoninds(tn, edge)) == 1, then the
tensors are not connected and by this definition the weight is zero. Users
can of course use their own function to compute weights for particular use
cases, and pass the weights as necessary into graph functions that will use
them.
@LinjianMa https://github.com/LinjianMa I think this is also what you
are using?
—
Reply to this email directly, view it on GitHub
https://github.com/mtfishman/ITensorNetworks.jl/pull/30#issuecomment-1362017295,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGEKYNNG3EOZPJKDVDGGCXLWONNQBANCNFSM6AAAAAATFBWTPE
.
You are receiving this because you were mentioned.Message ID:
@.***>

In the latest I made some changes to the partition interface. The new syntax is summarized below:
julia> using ITensorNetworks

julia> tn = ITensorNetwork(named_grid((4, 2)); link_space=3);

subgraph_vertices returns a list of subgraph vertices according to the specified partitioning:
subgraph_vertices
julia> tn_sv = subgraph_vertices(tn; npartitions=2) # Same as `partition_vertices(tn; nvertices_per_partition=4)`
2-element Vector{Vector{Tuple{Int64, Int64}}}:
 [(1, 1), (2, 1), (1, 2), (2, 2)]
 [(3, 1), (4, 1), (3, 2), (4, 2)]

partition_vertices returns a graph with subgraph vertices as the vertex data and edges defining which subgraphs are connected according to the specified partitioning:
partition_vertices
julia> tn_pv = partition_vertices(tn; npartitions=2);

julia> typeof(tn_pv)
DataGraph{Int64, Vector{Tuple{Int64, Int64}}, Any, NamedGraphs.NamedGraph{Int64}, NamedGraphs.NamedEdge{Int64}}

julia> tn_pv[1]
4-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (2, 1)
 (1, 2)
 (2, 2)

julia> edges(tn_pv)
1-element Vector{NamedGraphs.NamedEdge{Int64}}:
 1 => 2

julia> tn_pv[1 => 2]
2-element Vector{NamedGraphs.NamedEdge{Tuple{Int64, Int64}}}:
 (2, 1) => (3, 1)
 (2, 2) => (3, 2)

subgraphs returns a list of subgraphs according to the specified partitioning:
subgraphs
julia> tn_sg = subgraphs(tn; npartitions=2);

julia> typeof(tn_sg)
Vector{ITensorNetwork{Tuple{Int64, Int64}}} (alias for Array{ITensorNetwork{Tuple{Int64, Int64}}, 1})

julia> tn_sg[1]
ITensorNetwork{Tuple{Int64, Int64}} with 4 vertices:
4-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (2, 1)
 (1, 2)
 (2, 2)

and 4 edge(s):
(1, 1) => (2, 1)
(1, 1) => (1, 2)
(2, 1) => (2, 2)
(1, 2) => (2, 2)

with vertex data:
4-element Dictionaries.Dictionary{Tuple{Int64, Int64}, Any}
 (1, 1) │ ((dim=3|id=169|"1×1↔2×1"), (dim=3|id=124|"1×1↔1×2"))
 (2, 1) │ ((dim=3|id=169|"1×1↔2×1"), (dim=3|id=105|"2×1↔3×1"), (dim=3|id=352|"2×1↔2×2"))
 (1, 2) │ ((dim=3|id=124|"1×1↔1×2"), (dim=3|id=789|"1×2↔2×2"))
 (2, 2) │ ((dim=3|id=352|"2×1↔2×2"), (dim=3|id=789|"1×2↔2×2"), (dim=3|id=254|"2×2↔3×2"))

partition returns a graph with subgraphs as the vertex data and edges defining which subgraphs are connected according to the specified partitioning:
partition
julia> tn_pg = partition(tn; npartitions=2);

julia> typeof(tn_pg)
DataGraph{Int64, ITensorNetwork{Tuple{Int64, Int64}}, Any, NamedGraphs.NamedGraph{Int64}, NamedGraphs.NamedEdge{Int64}}

julia> tn_pg[1]
ITensorNetwork{Tuple{Int64, Int64}} with 4 vertices:
4-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (2, 1)
 (1, 2)
 (2, 2)

and 4 edge(s):
(1, 1) => (2, 1)
(1, 1) => (1, 2)
(2, 1) => (2, 2)
(1, 2) => (2, 2)

with vertex data:
4-element Dictionaries.Dictionary{Tuple{Int64, Int64}, Any}
 (1, 1) │ ((dim=3|id=169|"1×1↔2×1"), (dim=3|id=124|"1×1↔1×2"))
 (2, 1) │ ((dim=3|id=169|"1×1↔2×1"), (dim=3|id=105|"2×1↔3×1"), (dim=3|id=352|"2×1↔2×2"))
 (1, 2) │ ((dim=3|id=124|"1×1↔1×2"), (dim=3|id=789|"1×2↔2×2"))
 (2, 2) │ ((dim=3|id=352|"2×1↔2×2"), (dim=3|id=789|"1×2↔2×2"), (dim=3|id=254|"2×2↔3×2"))

julia> tn_pg[1 => 2][:edges]
2-element Vector{NamedGraphs.NamedEdge{Tuple{Int64, Int64}}}:
 (2, 1) => (3, 1)
 (2, 2) => (3, 2)

@JoeyT1994 let me know what you think. Should supersede #34 and close #28.
Also, the example of partitioning a partitioned graph discussed in #28 can now be done with:
using ITensors
using Graphs
using NamedGraphs
using ITensorNetworks
using SplitApplyCombine
using Metis

s = siteinds("S=1/2", named_grid(8))
tn = ITensorNetwork(s; link_space=2)
Z = prime(tn; sites=[]) ⊗ tn
vertex_groups = group(v -> v[1], vertices(Z))
# Create two layers of partitioning
Z_p = partition(partition(Z, vertex_groups); nvertices_per_partition=2)
# Flatten the partitioned partitions
Z_verts = [reduce(vcat, (vertices(Z_p[vp][v]) for v in vertices(Z_p[vp]))) for vp in vertices(Z_p)]

which can be found in examples/group_partition.jl.

Hi Matt,
This looks great to me. Being able to stack partitioning like that is really helpful for memory efficient generalized belief propagation.
I will close PR #34 as I believe this supercedes it.
In early Jan I will create a PR 2 for belief propagation where the example and test takes advantage of this interface. I will also improve the mechanism for calculating expectation values.


How to change the stride on using the Convolution2D in keras?

Please make sure that the boxes below are checked before you submit your issue. Thank you!

[ ] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

[ ] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[ ] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

Hello,Sirs,
I am using the CNNs for picture classification, I doubt that how to change the stride on using the Convolution2D in keras?
Thank you so much!

@liuhuixiang
Personally I recommend users to not open issues before reading the documents. Because there are a lot of issues here, and many of them are actually not good quesions.
You can set the argument subsample for modifying the stride.

@MoyanZitto Thank you, Sir!  Get it, I am careless !


Polling slower than LiveReload.app?

Hi,
I am working on a small static website assembled with gulp and served with gulp-webserver during development. Overall it's working fine, however it seems that live reload via gulp-webserver is somewhat slower to reload as compared to the liveReload.app (all of this on OS X 10.10)
I did not do hard measurements, but it's in the range of 1-2 seconds slower after doing e.g. a touch index.html in the root of the build directory. Not critical, but faster is always good.
Is there an explanation for this or better a fix, can the polling frequency be sped up? At this point I have <25 files watched, so would not expect it to be due to the size of the file tree.

I think as a slow reload than I even gulp-connect.
Is there a reload log that has been output by gulp-connect?
[16:55:40] Starting 'reload'...
[16:55:40] Finished 'reload' after 5.36 ms

I have 2 files being watched and simply changing a string in a static html file takes over a second for a reload - seems very slow

#92
You could set the polling interval in the watchOptions - see pull request!

+1

I trying https://github.com/hiddentao/gulp-server-livereload I think it's working faster


Secrets are not found in Jupyter Notebooks

I'm submitting a ...

[x] bug report
[ ] feature request

What is the current behavior?

If  I open an new Jupyter Notebook (in JupyterLab 4.0.9) and write in the first cell
def my_very_secret_function(my_password = "bar"):
    pass

see secret is not found while using detect secrets as a pre-commit hook.
This is because the cell has the following form in the saved file.
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aa11ab85-ce4e-4803-92c9-0f48e2ce4c52",
   "metadata": {},
   "outputs": [],
   "source": [
    "def my_very_secret_function(my_password = \"bar\"):\n",
    "    pass"
   ]
  }

As you can see there is a backslash \ before the quotation mark ". I think because of this no regular expressions matches the secret.

What is the expected behavior?
I expect that detect_secrets finds secrets in pure python and jupyter notebooks.
Technical information

Detect secrets version    : 1.4.0
Python version      :  3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0]
IPython version     :  8.14.0
Tornado version     :  6.3.3
Operating system    :  Linux-4.19.0-21-amd64-x86_64-with-glibc2.35
JupyterLab version    : 4.0.9

Closing as duplicate of https://github.com/Yelp/detect-secrets/issues/780.


Fallback to in-cluster authentication via service account token

This PR implements a fallback to in-cluster authentication via service account token when no valid kubeconfig can be found.
For more info see: https://github.com/gruntwork-io/terratest/issues/753
I manually tested this by running the following inside a Kubernetes pod:
package test

import (
	"fmt"
	"testing"

	"github.com/gruntwork-io/terratest/modules/k8s"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestInClusterAuth(t *testing.T) {
	options := k8s.NewKubectlOptions("", "", "default")

	pods := k8s.ListPods(t, options, v1.ListOptions{})
	for _, p := range pods {
		fmt.Println(p.Name)
	}
}

Which resulted in:
root@golang:/go/terratest# go test -v auth_test.go
=== RUN   TestInClusterAuth
TestInClusterAuth 2021-01-15T10:35:14Z client.go:35: Configuring kubectl using config file /root/.kube/config with context
TestInClusterAuth 2021-01-15T10:35:14Z client.go:39: Error loading api client config, falling back to in-cluster authentication via serviceaccount token: stat /root/.kube/config: no such file or directory
TestInClusterAuth 2021-01-15T10:35:14Z client.go:44: Configuring kubectl using in-cluster serviceaccount token
golang
nginx-deployment-c9dcf7b89-jhff4
nginx-deployment-c9dcf7b89-th97v
rabbitmq-0
redis-master-0
redis-slave-0
redis-slave-1
--- PASS: TestInClusterAuth (0.02s)
PASS
ok      command-line-arguments  0.038s

Thanks a lot for getting this merged so quickly!

Thanks a lot for getting this merged so quickly!


Type constraints block downward inference

If a type has a generic parameter with a constraint, then that parameter doesn't seem to be inferred using downward inference. See the following example:
class Foo<T extends Iterable> {}

void main() {
  // [error] Type check failed: new Foo() (Foo<Iterable<dynamic>>) is not of type Foo<List<dynamic>>
  Foo<List> foo = new Foo();
}

I can take a look. This might be related to a TODO, we use matchTypes for downwards constructor inference, which isn't as powerful as the technique we're using for downwards generic methods

looks like it works now. Sent you a CL that adds a regression test: https://codereview.chromium.org/2214123002


Weird dialog box pop up when switching from Renderers tab to Navigation tab

To reproduce:

Invoke vapor from command line with data set KatrniaMaster.nc passed in.
The default tab is Renderers. Click Navigation.
A weird window pops up, as the screenshot shows. Neither of the buttons seems to have any effect.

This bug seems no longer there... I'm gonna close it unless it resurfaces.


fix(modeling): add extrudeHelical type definition

Closes #1260
Some typing definitions were missing.
Tests pass.

Would you like me to bump up the version too, @z3dev ?

Would you like me to bump up the version too, @z3dev ?

I'll try to cut a new version tomorrow. It was a bit hectic today.


[V2] .md extensions not stripped when linking to other documents

🐛 Bug Report
When referencing other .md files, Docusaurus generates the HTML link /dir/B.md instead of /dir/B, returning Markdown instead of HTML.
Have you read the Contributing Guidelines on issues?
Yes.
To Reproduce
Within /docs, create the following directory structure:

# A.md

Going to [B](dir/B.md)

# B.md

**This is B!**

npm run start
Navigate to /docs/A
Click link to B.

Expected behavior
We should arrive at /docs/dir/B.

Actual Behavior

We arrive at /docs/dir/B.md instead of /docs/dir/B. The browser displays raw Markdown instead of HTML.
Reproducible Demo
https://github.com/yosriady/docusaurus-2283

I can not reproduce this :man_shrugging:


fix: correct Binary instance of LittleEndian type

Related to https://github.com/zkFold/zkfold-base/issues/130.
Not sure if current behaviour is as expected, but this is what I had in mind.
"Binary instance" test pass by this modification. Use of reverse can be avoided by modifying accum function accordingly.

Use of reverse can be avoided by modifying accum function accordingly.
Can you make this change?

Hi @echatav, I have made the required change, please have a look.


drivers: console: update USB_UART_CONSOLE description

Remove outdate text and add note what the option in
the console driver does.

I'm wondering if we should mention somewhere here that in general this USB UART console works if this option is applied as well:
CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51?


Possible bug with contains and allDay

While checking to see if the range 2015-07-01 - 2015-07-31 contained certain dates, I noticed that 2015-08-01 was evaluating as true.
I was using: moment("2015-07-01").twix("2015-07-31", {allDay: true}).contains("2015-08-01");
After doing some more testing I noticed that if i add a 'Z' to all the dates, then it evaluates as false.
moment("2015-07-01Z").twix("2015-07-31Z", {allDay: true}).contains("2015-08-01Z");
Now one thing of importance is that the allDay flag is set to true, when setting that to false, then it does not matter if I use 'Z' or not, they both evaluate to false. (as they should)
Perhaps I am missing something, but this doesn't produce the behavior I was expecting.  It was my understanding that it should be evaluating to see if Aug 1st is contained in the date range 2015-07-01 00:00:00 to 2015-07-31 23:59:59.  It shouldn't matter if I use the local timezone or UTC, as long as they are all using the same timezone.
Tested with Moment 2.10.6 & Twix 0.6.4

Definitely a bug. Fixed, pushed, and released in 0.6.5.
In general, Twix is complicated by the fact that sometimes all-day ranges should be treated as closing over the first milli of the next day (e.g. when displaying) and sometimes not (e.g. contains).
Thanks for the detailed bug report!

Well, apparently my memory is bad, because this wasn't a bug; this was a deliberate decision (see, e.g. #44). So now I'm less sure this was a good idea. I may pull the 0.6.5 release and leave this in the 0.7.0 release.


CASMINST-5334: Linting

Backport of https://github.com/Cray-HPE/docs-csm/pull/2452

/backport release/1.0


Fix reversed log parameter binds

Fixes #930
Problem
Query binds logged in reversed order
Solution
Fix it
Notes
Additional notes.
Checklist

[x] Unit test all changes
[x] Update README.md if applicable
[x] Add [WIP] to the pull request title if it's work in progress
[x] Squash commits that aren't meaningful changes
[x] Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

Thank you @mentegy!


Added the Ohlone college.

Official website: https://www.ohlone.edu/
IT Related course: https://www.ohlone.edu/program/computer-engineering
Example on domain, scroll to the bottom: https://www.ohlone.edu/it/studentemail

@Nesox Pull request merged. Thank you!


US latch: Transport Statistics for Household

Local Area Transportation Characteristics for Households - Census tract level miles and trips
Note: README file to be updated.

Closing the PR as its tracked in newly created PR#791.


Endpoint is set statically in Google Cloud Auto ML as a result of which EU models are not usable

Environment details

Ubuntu
PHP 7.1
"google/cloud-automl": "^0.9.0"

Steps to reproduce
Hi,
The Google Cloud Auto ML library throws an error when using EU prediction models stating that 'The provided location ID doesn't match the endpoint. For automl.googleapis.com, the valid location ID is us-central1. For eu-automl.googleapis.com, the valid location ID is eu.\
Initially, I thought that the model might have been hosted in the US (even though the dataset info in GCP Console is set to EU), so I switched to us-central1. When I switched, I got another error message that the model was not found or not enabled for prediction.
I thought there might be something wrong, so I checked the GCP Console endpoint of the model and saw that it was 'eu-automl.googleapis.com' and in the above error message it states that the location ID does not match 'automl.googleapis.com', so it seemed to me that the endpoint is not 'automatically switched' based on the 'location id' and that the endpoint must have been statically set without the option to change.
I dove into the library code and found the following const in the PredictionServiceGapicClient Class.
`const SERVICE_ADDRESS = 'automl.googleapis.com';
This explained the issue and changing this to eu-automl.googleapis.com made the prediction model work properly.
I suppose / suggest this should not be constant and that the endpoint (SERVICE_ADDRESS) can can be set / changed based on the provided location ID in order to work for non 'us-central1' models.
Thank you.

Thanks kindly for the report @mhimi1. We do provide an option at construction time of the AutoML client to override the endpoint: https://github.com/googleapis/google-cloud-php/blob/1d0ae536dfed84c8bf37cc488c729f104bf7ed0f/AutoMl/src/V1/Gapic/AutoMlGapicClient.php#L447-L449
Dynamically changing the endpoint based on the location is difficult, as this client is generated. I'll make sure to pass the feedback along to the AutoML team to see if there's anything we can do to make this easier.


[Pagination] keyboard (accessibility) navigation

When navigating the pagination lab feature using tab and shift-tab, there's no way to get to the "..." section in any meaningful way.  This means the user is constrained on how many pages they can get to without going one-by-one.
(related: the < and > buttons at the end perhaps should be configurable to pages of counts instead of one at a time?)

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
Examples 🌈
Well, here there is little to go on.  The material design specification discourages paging, instead opting for infinite scroll. This itself is an accessibility nightmare, via keyboard or (for tv) remote control navigation.
The two material bootstrap implementations only have 3 pages in their demos, so there's no model there to look at either.
Motivation 🔦
I have not yet decided if paging is the right model for having significantly large numbers of 'albums' in a folder or songs in a playlist when dealing with navigation on a TV using the limited input capabilities of a remote control. This was just something that came to mind when I was first experimenting with it in the docs.
Also, in the matter of keyboard focus handling, I already accept that this type of component presents a significant challenge as buttons are moved and removed when paging through the middle.

@acroyear How is it different from GitHub pagination?

I'd never used github's pagination by a keyboard before, because it isn't a library that I'm using for making applications for Android and Fire TV devices.
It behaves the same. That's fine. I'm just noting a reason how it is not quite right for my potential use case or other situations with exceptionally large data sets, but yes, I do acknowledge that it works very well already. (thus why I filed as feature req instead of bug)
One counter to the large data set problem is to introduce filtering of some type, to make 100 pages more reasonable by bringing it down to 10-ish.  Trivial with a mouse, but not so with just a keyboard or remote - lots of clicks to get to the filter, then clicks back down to get to the pager.  Especially if, as in github's case, the filter is at the very top of the page while the pager is at the bottom.
I'll hunt around later this week and see if others have approached the '...' problem differently that might serve as an potential inspiration.

@acroyear Interesting, so it's a matter of the targeted platform.

Would an input field solve your issue?

@acroyear Could you explain how this relates to keyboard navigation? The "…" is a static element that triggers no interactions. It seems to me that this is a general issue you would like to see implemented?


update api document

https://github.com/open-cluster-management/backlog/issues/9124
Signed-off-by: clyang82<EMAIL_ADDRESS>

/assign @marcolan018


Functions for searching & getting PFT details & obtaining plots of run outputs

Function to search for PFTs based on string matching on PFT name, PFT type & Model type
Function to obtain details for a specific PFT based on PFT ID
Function for obtaining plots from run outputs

Review Time Estimate

[x] Immediately
[ ] Within one week
[ ] When possible

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

@robkooper has this met your request changes?


The watch face does not work if the weather is displayed

If the weather is displayed in one of the fields on the watch face, an error occurs.
Model: VA4
Firmvare Version: 5.10
Here are the logs:
Error: Unexpected Type Error
Details: 'Failed invoking <symbol>'
Time: 2020-10-03T12:17:52Z
Part-Number: 006-B3225-00
Firmware-Version: '5.10'
Language-Code: eng
ConnectIQ-Version: 3.2.1
Store-Id: c97c4e34-55e4-4601-b5c2-45763bc481a2
Store-Version: 91
Filename: A7864634
Appname: Huwaii
Stack:
  - pc: 0x10001ae4
  - pc: 0x10009cf6
  - pc: 0x10005f58
  - pc: 0x10009eb4
  - pc: 0x100087d6
  - pc: 0x10008573

Any news on this issue? 🤭


Windows issues

I tried on wife's pc with Win7 64bit and I had many issues.

After default installation the desktop link didn't work, there was no iguana orange icon and it said that the link didn't exist or had been moved. I searched for the Iguana exe in my computer but couldn't find it. There was a folder with the uninstaller but even using the search function I was unable to find a folder with Iguana (or I suck at searching). At the end I uninstalled everything
I made a second install and during installation I selected the folder: Iguana and Iguana2 under C  so I was sure to find them. Almost at the end of installation it said there was a problem running post install step because ucrtbased.dll was missing but the installation proceeded anyway to the end.
This time the desktop link had an icon and worked. The first time I tried running Iguana I encountered the same issue I found in Ubuntu: after veryfing the seed and clicking Register it said "ops... something went wrong!". Anyway I could again enter the seed and access the wallet.
I started Btc in basilisk mode and the large Btc icon had the word "notarychains" instead of "bitcoin" written over it. I started also Ltc in basilisk but its icon had the usual Litecoin name
Even in basilisk it took a lot of CPU, almost 98% making the pc very slow and fan spinning.

I closed everything and I'll try again tomorrow.

try new installer
try new installer
I'm aware of the issue. Fix will be shipped with next beta
I'm aware of the issue. Fix will be shipped with next beta
That's new. Need to know the EXACT steps to replicate. You can also ask any other users around in Slack if they experience the same issue following the exact steps that you are trying. Exact steps matters.

Don’t change the default location of application in installation wizard. It’s not dynamic and you might get the exact errors you reported of shortcuts not working after changing install location. will look for the dynamic options later, but for now that’s how it is.

Tried the new installer on wife computer:

Same problem but I found the exe. Weird: computer has admin user called "Simona" and normal user called "Simona_2". I made installation under normal user, it says the Iguana.exe will be in IguanApp folder inside /Users/Simona_2 folder, the desktop link also points there. But at the end the IguanaApp folder wasn't there but under /Users/Simona, the admin user.
Didn't happen
Happened again, I had only Btc in basilisk mode and cpu was working at 98%, then there was a notice that it couldn't connect to Iguana and I got log-out, I entered again and the Btc icon was missing. I added again Btc in basilisk but it said the Bitcoin was already running. I closed Iguana but from the windows task manager I saw it continued to run, I had to manually stop the process.

I just tried in a VM with Win7. This VM has an admin (win7pc) and a normal user (user) accounts and I installed as normal user. Again there was a mismatch, this time the installation gui said that IguanaApp will be installed under admin folder (c:\users\win7pc\iguanaapps\iguana.exe) but the desktop link points to a folder under normal user (c:\users\user\iguanaapps\iguana.exe).
now waiting for the app to start, it seem to take forever

I discovered new bug in latest windows installer, thanks to @pondsea.
You will probably need to install "Visual C++ Redistributable for Visual Studio 2015" manually if you want to test at this stage. The new install somehow just skips it to install after downloading. will need to install both x64 and x86.
https://www.microsoft.com/en-nz/download/details.aspx?id=48145
I haven't shipped updated EasyDEX-GUI with new windows installer, only the possible fix, which seems to be behaving differently than expected.
98%+ CPU usage in just Basilisk Mode seems to be reported to @fadedreamz, as we are using iguana daemon for windows 32bit. I know the windows iguana daemon isn't perfect yet. So, expect some issues. and report them to @fadedreamz.

I wrote to @fadedreamz yesterday. This evening I tested the new version 1.1.2 on two Win7 64 bit, one a VM and the other my wife's computer. The results were the same and in general it worked much better than the previous time. I tested only KMD in full mode and BTC in basilisk. I found the following issues:

If I create a new address for KMD or BTC it creates a new address for the other coin too (or is it supposed to work this way?)
If I log out and log in again it doesn't save any setting, I need to select a coin again instead of just entering my seed and find the coins I already used.
When I re-enter the wallet I find that only the first receiving address is always the same. The new generated addresses don't get saved between sessions and when I generate them they are always different from the previous time.
Sometimes I get logged out when creating new addresses.
As previously, installing as normal user the folder with the uninstall.exe get installed in the normal user system, while the main IguanaApp folder is in the admin user system (already told to @fadedreamz)
UI: I suggest to move the selection of full or basilisk mode under the coin selection, you have to pick the coin first anyway
7: UI: I suggest to delete "add coin" from the coin menu, the add-coin button in the upper right corner is enough

it is supposed to happen that way
it is supposed to happen that way as well
the new generating addresses feature will be disabled for first public release. will be enabled again soon in future releases.
iguana.exe crashes
no idea what is going on. installer picks the logged in user's home directory. you must have some user/admin privilege issues or something.
thanks, will considering doing updates on them in next release

both point 6 tasks are done in latest EasyDEX-GUI repo.


Problem with dataloaders

Hi @xu-ji ,
Thank you so much for your work and sharings.
I have tried to train the clustering model on a custom dataset using your function  "create_basic_clustering_dataloaders" but I can not get out of this error:
TypeError: batch must contain tensors, numbers, dicts or lists; found <class 'torchvision.datasets.folder.ImageFolder'>
Do you have any idea on this ?

Can you give the full error trace? Including line number, file etc.

Thank you, I used wrong dataloader. It is ok now.

Hi  @nhuvan,
How did you solve this problem? I got this same error and could not find out where I went wrong.


Feature request: option to determine project based on git root rather than working directory

Would be cool to have the ability to add and navigate files based on git root (go up until you find .git directory), rather than current working directory. So that it's possible to lcd to subdirectory and add file, and it will still work.

huh?


Camera collides with low mesh

Camera jumping while moving on to not so high mesh.
https://user-images.githubusercontent.com/5358438/226060976-ce5558a2-cea8-4d27-8553-c20e7491aefb.mp4

It looks like an issue with camera sockets on your character skeleton. Check that the skeleton has camera sockets and that they are specified in CS_Als_Default.


Cors sub domains cache issue?

Description:
We have to subdomains like test1.test.nl and test2.test.nl and we use envoy as a gateway and its has subdomain gateway.test.nl.
if i go to the application on test1.test.nl everything is fine. But if i go 2 test2.test.nl i get a cors error. If i look to the request the allow-origin has the value:
access-control-allow-origin: https://test1.test.nl
access-control-expose-headers: Content-Disposition,If-Modified-Since,Location,Last-Modified
content-encoding: gzip
content-type: application/json; charset=utf-8
date: Wed, 08 Apr 2020 06:49:59 GMT
if-modified-since: Mon, 06 Jan 2020 13:54:05 GMT
last-modified: Mon, 06 Jan 2020 13:54:05 GMT
server: envoy
status: 200
vary: Accept-Encoding
x-envoy-upstream-service-time: 5
Referer: https://test2.test.nl/
Our configuration is like:
      route_config:
        name: test_route
        virtual_hosts:
        - name: test_services
          domains:
          - "*"
          cors:
            allow_origin_string_match:
              - safe_regex:
                  google_re2: {}
                  regex: https:\/\/.*(test.nl|production.nl)
            allow_headers: "Accept,Accept-Encoding,Accept-Language,Content-Type,Content-Length,User-Agent,Referer,Authorization,Cookies,Host,Origin,Connection,Sec-Fetch-Mode,Sec-Fetch-Mode,Sec-Fetch-Site,X-Requested-With"
            allow_credentials: true
            allow_methods: GET,PUT,DELETE,POST,OPTIONS
            expose_headers: "Content-Disposition,If-Modified-Since,Location,Last-Modified"

Is something wrong in the config?

cc @dschaller

sorry, probleem was that some microservice use the If-Modified-Since header in the response.


fix typo

Codecov Report

Merging #330 into 2.0 will not change coverage.
The diff coverage is n/a.

@@         Coverage Diff         @@
##            2.0   #330   +/-   ##
===================================
  Coverage   100%   100%
===================================
  Files        28     28
  Lines       758    758
===================================
  Hits        758    758

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 9ca19c5...5ee3eaf. Read the comment docs.

@zenogantner thanks! I'll merge this


PYIC-3429: Add validation to radio buttons

Proposed changes
What changed
Added radio button form validation to all core-front pages which have a radio button forms

Added nunjucks filter to push more keys into an object
Added a check function to determine whether journey is undefined and set an errorState

Added routes for each individual form POST which has the new form validation check
Used the latest translations provided by content for the error messages
Regarding page-ipv-bank-account-start.njk form validation I have added a placeholder message which is from the other error messages, this will need to be updated when we get finalised content
Why did it change
Users where previously able to submit a form without selecting an option which would default to using the first item in the form.
Issue tracking

PYIC-3429

Checklists
Environment variables or secrets

[x] No environment variables or secrets were added or changed

Did you consider using something like https://express-validator.github.io/docs/ ? From Googling around that seems to be the most common way of adding some validation to an Express app.
Not sure what the exact rules are on adding more libraries/dependencies to the project, but we are using Express already.

Did you consider using something like https://express-validator.github.io/docs/ ? From Googling around that seems to be the most common way of adding some validation to an Express app. Not sure what the exact rules are on adding more libraries/dependencies to the project, but we are using Express already.

No longer necessary with using render over the redirect, we can just define and sanitize the url like we have done elsewhere


Fix multiple openai clients

Since the OpenAI module is setting parameters on the base openai import, it's not possible to use multiple different models that use an openai compatible api (e.g. both a local ollama model server and gpt4).
Manual testing:
import dspy
llama_client = dspy.OpenAI(
    api_base="https://api.fireworks.ai/inference/v1/",
    model="accounts/fireworks/models/llama-v2-70b-chat",
    model_type="chat",
    api_key=API_KEY
)
mixtral_client = dspy.OpenAI(
    api_base="https://api.fireworks.ai/inference/v1/",
    model="accounts/fireworks/models/mixtral-8x7b-instruct",
    model_type="chat",
    api_key=API_KEY
)
print(llama_client.basic_request("hello")["model"])
print(mixtral_client.basic_request("hello")["model"])

HTTP Request: POST https://api.fireworks.ai/inference/v1/chat/completions "HTTP/1.1 200 OK"
accounts/fireworks/models/llama-v2-70b-chat
HTTP Request: POST https://api.fireworks.ai/inference/v1/chat/completions "HTTP/1.1 200 OK"
accounts/fireworks/models/mixtral-8x7b-instruct

Cached output (no request is sent)
print(llama_client.basic_request("hello")["model"])
print(mixtral_client.basic_request("hello")["model"])

accounts/fireworks/models/llama-v2-70b-chat
accounts/fireworks/models/mixtral-8x7b-instruct

Hi @rawsh , thanks for the contributions! I believe this may break the cache but tagging @okhat for reference here.
Would it be possible to not touch the cache functions to make this change?

@arnavsinghvi11 I think without the cache modifications caching for different models would be broken (e.g. same prompt on gpt3.5 could pull in cached responses from gp4). Would gladly take any suggestions on how to improve it though. Is the main problem existing caches would break?

yeah ideally if we can add this support without modifying the existing behavior, this won't break the existing caches. Curious if you can only add the client creation as a separate flag, while keeping the rest of the cache function behavior the same. dspy.Databricks might help in this direction since it's a wrapper around the GPT3 class.


Dark scrollbar background when using dark menu bar

The background colour of the scrollbar is dark when the dark menu bar is enabled:

Preventing a dark colour on the scrollbar or creating a dark version of the app would be nice!

fixed by allowing the dark mode


[Microbyte] Building a drum-kit webpage using JavaScript

Closes #27
Added a MicroByte to involve the learners to build their own drum-kit webpage from scratch.
Checklist:

[x] Added activities for learners
[x] Didn't give the solutions to the added activities straight away
[x] Followed a LearnByDoing approach
[x] Clean and well documented code (if source code files are involved)
[x] Added image references for better understanding if deemed necessary

@sandip2224 U have sound folder in two places. Please remove the one that is outside the src folder

@sandip2224 We are truly apologize for the technical glitch from our end and for the hassle that you're gonna undertake due to it.
I checked your branch on your forked repo, kindly create a new PR. It must have the same title and description as this one and we'll review it then.
Kindly do this one favour for us.
Remember, your contributions are always welcome.
If you face any issues, kindly reach out to us and we'll sort it out.

It's fine. I've raised the PR again. Could you please check?

On it! Thank you.


PAYLOAD_MAX_BYTES

const PAYLOAD_MAX_BYTES = 256;

This length should be edit ?

They must have increased the limit since the library was built. I think it used to be 256 bytes.


Can't disable marker moving/deletion

http://jsfiddle.net/sw5sjbgg/2/
If I create a marker, even if I pass options like:
var marker_options = {
    draggable: false,
    preventMarkerRemoval: true,
};

They only prevent moving and deletion during the first editing "session". If click the "edit" button twice, I'm able to delete and move the marker. Also, the marker is deletable through the "remove" button.
Is this expected behaviour? How can I disable moving and deleting markers?

hi @augustoborn, no that's not expected. Thanks for reporting. Will be fixed in the next version


How to display hidden modules

How to display hidden modules, when I add --display-modules seems ineffective .
My configuration is as follows :
var webpack = require('webpack');
var path = require('path');
var fs = require('fs-extra');
var packageJSON = fs.readJsonSync('./package.json');

var nodeModules = {};
fs.readdirSync('node_modules')
  .filter(function(x) {
    return ['.bin'].indexOf(x) === -1;
  })
  .filter(function(y) {
    return !(y in packageJSON.devDependencies);
  })
  .forEach(function(mod) {
    nodeModules[mod] = 'commonjs ' + mod;
});

module.exports = {
    entry: './app.js',
    target: 'node',
    node: {
        __dirname: false,
        __filename: false
    },
    output: {
        path: path.join(__dirname, 'build'),
        filename: 'output.js',
        externals: nodeModules,
    },
    externals: nodeModules,
    plugins: [
        new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}}),
        new webpack.IgnorePlugin(/\.(css|less)$/),
        new webpack.BannerPlugin('require("source-map-support").install();',
        { raw: true, entryOnly: false })
    ],
    devtool: 'sourcemap'
}

Run the command:
[luncher@localhost SingleIDEServer]$ webpack --display-modules
Hash: 625309cd4daaf29f8de9
Version: webpack 1.12.14
Time: 1352ms
Asset     Size  Chunks             Chunk Names
output.js  70.1 kB       0  [emitted]  main
output.js.map   409 kB       0  [emitted]  main
[0] ./app.js 3.03 kB {0} [built]
1/buildin/module.js 251 bytes {0} [built]
[2] ./config.js 5.01 kB {0} [built]
[9] ./middlewares/oauth_strategy.js 131 bytes {0} [built]
[10] ./router.js 3.84 kB {0} [built]
[11] ./middlewares/auth.js 1.54 kB {0} [built]
[13] ./common/logger.js 1.31 kB {0} [built]
[15] ./proxy/user.js 1.13 kB {0} [built]
[16] ./controllers/file_storage.js 25.5 kB {0} [built]
[29] ./middlewares/filter.js 835 bytes {0} [built]
[30] ./controllers/game.js 19.4 kB {0} [built]
[36] ./common/tools.js 1.53 kB {0} [built]
[40] ./middlewares/storage.js 492 bytes {0} [built]
[41] ./controllers/sign.js 2.28 kB {0} [built]
[43] ./controllers/sns/index.js 44 bytes {0} [built]
[44] ./controllers/sns/holaverse.js 681 bytes {0} [built]
[45] ./controllers/sns/config.js 867 bytes {0} [built]
[46] ./controllers/storage.js 8.03 kB {0} [built]
[48] ./controllers/import.js 14.1 kB {0} [built]
[49] ./controllers/export.js 8.49 kB {0} [built]
[53] ./common/common.js 4.71 kB {0} [built]
[54] ./middlewares/conf.js 221 bytes {0} [built]
[55] ./controllers/preview_app.js 2.31 kB {0} [built]
[56] ./controllers/publish_app.js 8.45 kB {0} [built]
[57] ./controllers/res_pairs.js 6.75 kB {0} [built]
[58] ./controllers/component.js 5.49 kB {0} [built]
[59] ./middlewares/error_page.js 145 bytes {0} [built]
[60] ./middlewares/proxy.js 497 bytes {0} [built]
[67] ./middlewares/static_res.js 3.11 kB {0} [built]
[68] ./middlewares/request_log.js 787 bytes {0} [built]
[69] ./middlewares/render.js 335 bytes {0} [built]
[70] ./middlewares/getgzip.js 2.25 kB {0} [built]
+ 45 hidden modules

Can you try with a recent version? --display-modules should definitely work. More info: https://stackoverflow.com/questions/28858176/what-does-webpack-mean-by-xx-hidden-modules . You could also re-open there.

i'm using webpack 1.13.2 and --display-modules isn't working for me either.  it still says 'hidden modules' at the tail end of the log output

so i tried using --display-modules --profile --json > stats.json
and it does show me the hidden modules... then ended up being extra .less files that are being imported into a main.less file.
so it seems the --display-modules only works when profiling?

hmm... i can't seem to get it to display the hidden less modules again... but it seems like it might be related to using extract text  webpack plugin.  the source of the main.less file reads
"source": "// removed by extract-text-webpack-plugin"

Just throwing away my 2 cents. --display-modules works fine in the current latest.

I can't get --display-modules to work with<EMAIL_ADDRESS>with or without --profile.

try enter the ---display-reasons and --display-modules

Having the same issue:
webpack version 1.14.0 displays hidden modules
webpack version 1.15.0 even with --display-modules --display-reasons and --profile will not display hidden modules.

Having the same issue:
not display hidden modules,no matter 1.14 or 1.15.

Does now work with  "webpack": "^3.4.1"

It's now working with 3.11.0.
Not tested with previous versions.

Does now work with "webpack": "^5.75.0",

Because the flag was removed, but you can use:
--stats-orphan-modules                                                             Add information about orphan modules.
--no-stats-orphan-modules                                                          Negative 'stats-orphan-modules' option.

You can find all flags with descroptions here - https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md


Carve-1.4.0:Compiling fails on g++ version 4.6.3

What steps will reproduce the problem?
1. Executed autogen.sh as follows.
sh ./autogen.sh
This created 'configure' file.
2. Executed configure as follows
sh ./configure --prefix=$HOME/carve
3. then executed make. This is the error that I get.

../include/carve/polyhedron_base.hpp:39:5: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:44:5: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:70:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:71:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:73:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:74:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:102:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:103:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:105:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:106:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:108:7: error: 'ptrdiff_t' does not name a
type
../include/carve/polyhedron_base.hpp:109:7: error: 'ptrdiff_t' does not name a
type
In file included from ../include/carve/poly_impl.hpp:25:0,
                 from ../include/carve/poly.hpp:24,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/polyhedron_impl.hpp: In member function 'bool
carve::poly::Geometry<3u>::orderVertices(order_t)':
../include/carve/polyhedron_impl.hpp:62:40: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:62:40: note: (if you use '-fpermissive',
G++ will accept your code, but allowing the use of an undeclared name is
deprecated)
../include/carve/polyhedron_impl.hpp:68:60: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:72:58: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:73:58: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::_faceNeighbourhood(const face_t*, int, T*) const':
../include/carve/polyhedron_impl.hpp:92:111: error: there are no arguments to
'edgeToIndex_fast' that depend on a template parameter, so a declaration of
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::faceNeighbourhood(const edge_t*, int, int, T) const':
../include/carve/polyhedron_impl.hpp:117:99: error: there are no arguments to
'edgeToIndex_fast' that depend on a template parameter, so a declaration of
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::faceNeighbourhood(const vertex_t*, int, int, T)
const':
../include/carve/polyhedron_impl.hpp:132:105: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::vertexToEdges(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:145:88: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::vertexToFaces(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:154:105: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Geometry<3u>::edgeToFaces(const edge_t*, T) const':
../include/carve/polyhedron_impl.hpp:166:99: error: there are no arguments to
'edgeToIndex_fast' that depend on a template parameter, so a declaration of
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'const face_t*
carve::poly::Geometry<3u>::connectedFace(const face_t*, const edge_t*) const':
../include/carve/polyhedron_impl.hpp:177:99: error: 'edgeToIndex_fast' was not
declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'bool
carve::poly::Polyhedron::edgeOnManifold(const edge_t*, int) const':
../include/carve/polyhedron_impl.hpp:201:99: error: 'edgeToIndex_fast' was not
declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'bool
carve::poly::Polyhedron::vertexOnManifold(const vertex_t*, int) const':
../include/carve/polyhedron_impl.hpp:210:94: error: 'vertexToIndex_fast' was
not declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Polyhedron::edgeManifolds(const edge_t*, T) const':
../include/carve/polyhedron_impl.hpp:222:99: error: there are no arguments to
'edgeToIndex_fast' that depend on a template parameter, so a declaration of
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int
carve::poly::Polyhedron::vertexManifolds(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:240:94: error: there are no arguments to
'vertexToIndex_fast' that depend on a template parameter, so a declaration of
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'bool
carve::poly::Geometry<3u>::orderVertices(order_t) [with order_t =
std::less<carve::geom::vector<3u> >]':
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:62:9: error: 'vertexToIndex_fast' was not
declared in this scope
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:68:11: error: 'vertexToIndex_fast' was not
declared in this scope
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:72:9: error: 'vertexToIndex_fast' was not
declared in this scope
make[1]: *** [convex_hull.lo] Error 1
make[1]: Leaving directory `/home/sandeep/Desktop/carve-1.4.0/lib'
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?
Carve version: 1.4.0 and operating system: Ubuntu 12.04
g++/gcc vesrion: 4.6.3

Please let me know if I am doing something wrong.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 20 Apr 2013 at 12:41

It also doesn't compile on GCC 4.7.2:

Making all in lib
make[1]: Entering directory `/home/sybren/carve/lib'
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../include -I../include/carve  -I../include   -g -O2 -MT convex_hull.lo -MD
-MP -MF .deps/convex_hull.Tpo -c -o convex_hull.lo convex_hull.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include/carve
-I../include -g -O2 -MT convex_hull.lo -MD -MP -MF .deps/convex_hull.Tpo -c
convex_hull.cpp  -fPIC -DPIC -o .libs/convex_hull.o
In file included from /usr/include/c++/4.7/ext/hash_map:61:0,
                 from ../include/carve/collection/unordered/libstdcpp_impl.hpp:19,
                 from ../include/carve/collection/unordered.hpp:33,
                 from ../include/carve/collection.hpp:20,
                 from ../include/carve/carve.hpp:51,
                 from ../include/carve/csg.hpp:24,
                 from convex_hull.cpp:22:
/usr/include/c++/4.7/backward/backward_warning.h:33:2: warning: #warning This
file includes at least one deprecated or antiquated header which may be removed
without further notice at a future date. Please use a non-deprecated interface
with equivalent functionality instead. For a listing of replacement headers and
interfaces, consult the file backward_warning.h. To disable this warning use
-Wno-deprecated. [-Wcpp]
In file included from ../include/carve/mesh.hpp:27:0,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/rtree.hpp:230:29: error: 'uint32_t' has not been declared
In file included from ../include/carve/mesh.hpp:873:0,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/mesh_impl.hpp:37:17: error: 'ptrdiff_t' does not name a type
In file included from ../include/carve/csg.hpp:32:0,
                 from convex_hull.cpp:22:
../include/carve/iobj.hpp:36:9: error: 'intptr_t' does not name a type
../include/carve/iobj.hpp: In constructor 'carve::csg::IObj::IObj()':
../include/carve/iobj.hpp:39:37: error: class 'carve::csg::IObj' does not have
any field named 'val'
../include/carve/iobj.hpp: In member function 'size_t
carve::csg::IObj_hash::operator()(const carve::csg::IObj&) const':
../include/carve/iobj.hpp:50:26: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In member function 'size_t
carve::csg::IObj_hash::operator()(const std::pair<const carve::csg::IObj, const
carve::csg::IObj>&) const':
../include/carve/iobj.hpp:53:32: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:53:55: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator==(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:71:40: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:71:49: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator!=(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:75:40: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:75:49: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator<(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:79:64: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:79:72: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator<=(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:83:64: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:83:73: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator>(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:87:64: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:87:72: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator>=(const
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:91:64: error: 'const struct carve::csg::IObj' has no
member named 'val'
../include/carve/iobj.hpp:91:73: error: 'const struct carve::csg::IObj' has no
member named 'val'
make[1]: *** [convex_hull.lo] Error 1
make[1]: Leaving directory `/home/sybren/carve/lib'
make: *** [all-recursive] Error 1

Original comment by<EMAIL_ADDRESS>on 26 Apr 2013 at 9:22

[deleted comment]

I solved this problem by adding

#include <stddef.h>

to the header file

../include/carve/polyhedron_base.hpp

but now I receive the following error:

../include/carve/face_decl.hpp: In member function ‘virtual void
GLUTriangulator::processOutputFace(std::vector<carve::poly::Face<3u>*>&, const
carve::poly::Face<3u>*, bool)’:
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> >
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:114:15: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> >
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:126:34: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> >
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:127:45: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> >
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:127:79: error: within this context
make[1]: *** [intersect-glu_triangulator.o] Error 1

Original comment by<EMAIL_ADDRESS>on 8 Oct 2013 at 2:22

You have to add the include files by yourself:

#include <stdint.h> //for uint32_t.
#include <stddef.h> //for ptrdiff_t

Original comment by<EMAIL_ADDRESS>on 9 Feb 2014 at 10:53

Hi,

Could you compile it finally? I am facing the same issue. Please let me know if
you found any solution.

Original comment by<EMAIL_ADDRESS>on 9 Feb 2014 at 6:01


JQcloud randomly gets stuck

In my application I need to redraw a cloud once a minute with a varying set of 75 words. The rendering is performed with delayed mode on and elliptic spiral. Every few minutes the script gets stuck after having rendered 50-70 words and locks the browser window. After stopping it from firefox'es "Unresponsive script" window the application runs fine until the next lockup. I noticed that every time the lockup occurs, the words that have been rendered until the script was stopped are not placed properly: many of them overlap. The script is always stopped in line 150 (jqcloud.js version 1.0.0. dated on Fri Apr 27 09:56:40 +0200 2012):
  while(hitTest(document.getElementById(word_id), already_placed_words)) {
    // option shape is 'rectangular' so move the word in a rectangular spiral
 >>>>>   if (options.shape === "rectangular") {
      steps_in_direction++;

At that time the values of radius and angle variables are in the range of 5000. The time between lockups seems to be random and I couldn't identify any patterns in the wordsets that cause them.
The issue is reproducible on Firefox versions 12-13.0.1 on Mac and on Linux.
Would you have any ideas on how to debug this problem?

Hi, I'm also facing this issue with the version "jqcloud-1.0.4.min.js". Seems like this is not resolved?
Problem occurs when I call $(".myclass").jQCloud(words, {shape: "rectangular"});


Light control is working for me, for whatever reason fan control does not.

@Xmister I finally had a chance to sit down and test your alterations.
First of all, a BIG, BIG thank you for the work you did. I really appreciate it :+1:
I ran into the issue that light control works fine, as does pairing the unit with my test board. Fan control on the other hand still seems to be a little illusive. The fan does not turn on and the unit usually beeps when you do, with the remote, but now it stayed silent and nothing happened.
I tried to figure out how to fix this but truthfully, my C(++) programming skills are woefully underdeveloped. Do you have any suggestions what I can do to properly test the functionality on my fans?

[20:30:56][C][lampsmartpro:140]: LampSmartProLight 'Huiskamer Light' [20:30:56][C][lampsmartpro:141]:   Cold White Temperature: 167.000000 mireds [20:30:56][C][lampsmartpro:142]:   Warm White Temperature: 333.000000 mireds [20:30:56][C][lampsmartpro:143]:   Constant Brightness: false [20:30:56][C][lampsmartpro:144]:   Minimum Brightness: 7 [20:30:56][C][lampsmartpro:145]:   Transmission Duratoin: 750 millis [20:30:56][C][fansmartpro:122]: FanSmartProFan ''
I am wondering if it has to do with this... it does not relay the name set for the device in the logs. It does however show up in HA.

@xNUTx Well I just copied my remote signal verbatim, so it's possible that the code does not work for every lamp.
BTW. This is how I did it:
Esphome code:
esp32_ble_tracker:
  scan_parameters:
    active: False
    continuous: False
    interval: 1000ms
    window: 1000ms
  on_ble_advertise:
      mac_address:
        - 59:BA:2B:D2:57:8D
        - 10:9E:3A:10:25:5D
        - 0c:90:43:19:e2:c8
      then:
        - lambda: |-
            ESP_LOGD("ble_adv", "New BLE device");
            ESP_LOGD("ble_adv", "  address: %s", x.address_str().c_str());
            ESP_LOGD("ble_adv", "  name: %s", x.get_name().c_str());
            ESP_LOGD("ble_adv", "  Advertised service UUIDs:");
            for (auto uuid : x.get_service_uuids()) {
                ESP_LOGD("ble_adv", "    - %s", uuid.to_string().c_str());
            }
            ESP_LOGD("ble_adv", "  Advertised service data:");
            for (auto data : x.get_service_datas()) {
                char ss[data.data.size()*6 + 4];
                sprintf(ss, "{ ");
                char* sspos = &ss[2];
                for (auto d: data.data) {
                  sprintf(sspos,"0x%02X, ",d);
                  sspos+=6;
                }
                sprintf(sspos-2," }");
                ESP_LOGD("ble_adv", "    - %s: %s", data.uuid.to_string().c_str(), ss);
            }
            ESP_LOGD("ble_adv", "  Advertised manufacturer data:");
            char num[4] = {0};
            for (auto data : x.get_manufacturer_datas()) {
                char ss[data.data.size()*6 + 4];
                sprintf(ss, "{ ");
                char* sspos = &ss[2];
                for (auto d: data.data) {
                  sprintf(sspos,"0x%02X, ",d);
                  sspos+=6;
                }
                sprintf(sspos-2," }");
                ESP_LOGD("ble_adv", "    - %s: %s", data.uuid.to_string().c_str(), ss);

            }

The listed MACs are the ones my remote used, you may need to remove them to get all the data, and once you identify your remote, you can filter for those.
Then you take the resulting service UUID and data for you buttons and replace the values in fan.h

Ah! That makes perfect sense now. The way you did it will only work for your lamp and not ever will work for any other lamp... I had been looking at your commands you issue, and saw the way you did it is so different from the lamp controls I expected something alike to be the case...
The thing is, between the remote and the lamp there has been a pairing. This pairing generates a code/serial number and that is used to encode the communications to make sure the signal used is legitimate and safe to execute... very required if you have more then one fan/lamp in the house working on BLE with the same type of remote...

I wanted to have the fan part working the same way, so it would be usable for everyone with a similar fan-light.

Yeah,  initially I wanted to do the same, but it just didn't want to work. Maybe the encryption was different, but I might have another try at it if I get some time.
You can also try to capture fan command codes properly. You can use the esphome code, then the unwhit.py to get the actual code. If you get the same result for multiple tries for the same function, we can make the code work as the lamp one.

This is the original source for control codes from the guy who made the initial version with light control only:
https://gist.github.com/aronsky/f433de654f008fedb5161e08eb32c33e
And the java code using them:
https://gist.github.com/aronsky/f2d8afab134d15f34256187a82a53a9c
Obviously, you can imagine I can read it a bit, but besides some javascript... this is not my strong suit either...

@Xmister do you by chance still have your initial code attempts while you where still working on trying to get the paired mode to work? My knowledge may be limited, but it will be a starting point I would think.
I have 2 of these fans, I really do not like to use a code base for both of them, I would really prefer the 'official' way if possible (and we know it is, as you can see the way it works on the light portion).

@xNUTx I have a code locally that works with the fan with the same kind of generated commands as light does. I'm still trying to find all the codes, but I'll upload it soon.

The codes are known, from the java code you can see what it expects together with the command code as parameters. Some values are simply booleans. I also worked on it myself reintroducing some code that got removed. Maybe you can use some of it, though I would not trust my handy work over that of your own. Either way, keep up the good work!!
Week holiday from today... I won't be working on anything during that time for sure.
--
Met vriendelijke groeten/Regards,
Barry Schut
a.k.a. [NUT]
Op 17 jul. 2024 22:42, om 22:42, "Péter Sárközi" @.***> schreef:

@xNUTx I have a code locally that works with the fan with the same kind
of generated commands as light does. I'm still trying to find all the
codes, but I'll upload it soon.
--
Reply to this email directly or view it on GitHub:
https://github.com/xNUTx/esphome-components/issues/3#issuecomment-2234104431
You are receiving this because you were mentioned.
Message ID: @.***>

NicoIIT
/
esphome-components
Hello, I tested this fork today and I can say it works with my Celling fan with led.

I'll be testing it next week 😁
--
Met vriendelijke groeten/Regards,
Barry Schut
a.k.a. [NUT]
Op 18 jul. 2024 11:23, om 11:23, drudgebg @.***> schreef:

NicoIIT
/
esphome-components
Hello, I tested this fork today and I can say it works with my Celling
fan with led.
--
Reply to this email directly or view it on GitHub:
https://github.com/xNUTx/esphome-components/issues/3#issuecomment-2235919742
You are receiving this because you were mentioned.
Message ID: @.***>

I am going to retire our work @Xmister as it seems @NicoIIT made it work. It has so many improvements I am going to sync up to his and drop everyting we both did.

Yeah, I also rebased on that, but added state restoration for fans.


add redis cluster management commands: slots, info and nodes

A quick implementation.
The usage will be: rcm = RedisClusterMgt(startup_nodes); rcm.info()
There are some reasons behind the design:

Since the class RedisClusterMgt will focus on cluster operation specific commands, it makes no sense to pass cluster command every time. Instead, directly calling info or nodes will be more concise. This does make newbies confusing because it is different from the official documentation. But they can grasp the concept quickly IMO.

Currently only three commands are implemented which are the ones related to meta data retrieval. The necessity of other types of commands is unknown since redis-tri.rb can do them well especially for complex commands like addslots

I am open for discussion. And if the current design is enough, I can work on some other commands and the tests.
Thanks!

I'll remove the print tomorrow morning.
I've looked at the implementation of redis-rb though, they implemented in the standard way which is r.cluster('slots'). Currently I don't know which is better. A specialised management class does make sense because in most of use cases they are not touched.
Btw, what's the future plan for the project? Do you plan to merge it with redis-py in some days? Because it has already implemented most of the features and been quite stable.

redis-py lib do not have any implemented cluster support right now. The only work i know that has been done is in this WIP PR 604 in redis-py. That work has been stalled out for now.
The future plans for this project is not set in stone right now because i was hoping that the work in that PR would continue and eventually be done and good enough so it could be merged into redis-py.
Currently i do not have that much time to put into porting the entire lib myself back to redis-py.
The thing is that i do not know what else todo with this lib right now because it supports most of the stuff that a redis cluster can do in some way or another. What is needed is more people using it so bugs and problems can be identified and fixed. Other then that, all i can do is refactor the code more and more and bring it closer to the style redis-py already is using to make the porting easier.
One thing i know i want to do in the future is more exploration of pipelines and pubsub solutions because i know they need some work to see what can be done on the client side.

@iandyh You have to fix the flake8 validation errors before i can merge it. But after that it is starting to look good :]

@Grokzen Good to hear! I will add tests to the module in the next few days.

@iandyh Hi. Any progress on the tests for this code? Really want to merge it so i can make a new release containing this.

@Grokzen Hi, I just wrote tests for it yesterday. I'll submit them today for merge.

@Grokzen There are fail cases in the UT. However it seems like it was from previous code...

The test failures is from your commits, you should be able to fix them by changing this code
diff --git a/tests/conftest.py b/tests/conftest.py
index 339fa14..a260f5e 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -76,17 +76,17 @@ def skip_if_redis_py_version_lt(min_version):
 @pytest.fixture()
 def o(request, **kwargs):
     """
-    Create a RedisCluster instance with decode_responses set to True.
+    Create a StrictRedisCluster instance with decode_responses set to True.
     """
-    return _init_client(request, decode_responses=True, **kwargs)
+    return _init_client(request, cls=StrictRedisCluster, decode_responses=True, **kwargs)

 @pytest.fixture()
 def r(request, **kwargs):
     """
-    Create a RedisCluster instance with default settings.
+    Create a StrictRedisCluster instance with default settings.
     """
-    return _init_client(request, **kwargs)
+    return _init_client(request, cls=StrictRedisCluster, **kwargs)

 @pytest.fixture()

@Grokzen There seems to be an invocation error which relates to pyflakes?

You have flake8 errors you have to fix, that is why you get a Invocation error
./rediscluster/__init__.py:8:1: F401 'RedisClusterMgt' imported but unused
from .cluster_mgt import RedisClusterMgt
^
./rediscluster/utils.py:99:1: W293 blank line contains whitespace
^
./rediscluster/utils.py:99:1: W391 blank line at end of file
^
./tests/test_redis_cluster_mgt.py:3:1: E302 expected 2 blank lines, found 1
class TestRedisClusterMgt(object):
^
./rediscluster/cluster_mgt.py:47:9: E301 expected 1 blank line, found 0
        def _split(line):
        ^
ERROR: InvocationError: '/home/travis/build/Grokzen/redis-py-cluster/.tox/flake8-py34/bin/flake8 --show-source --exclude=.venv,.tox,dist,docs,build,.git --ignore=E501,E731,E402 .'

You should be able to run flake8 locally with the following command if you have tox installed tox -e flake8-py34 it will run the flake8 check on all code and you can see when you have fixed the issues. When you have done it i will be able to merge this.

Oh yeah, one last thing. You must add a line in the file CHANGES describing what you have added. Also you can add yourself to docs/Authors if you want.

@Grokzen I am guessing this will be part of 0.3.0 release and I should add a line under it?

Yes you can do that, You can also add (iandyh) at the end of the line to indicate that you made that contribution

@iandyh Looks good now, i will have a look at it all later tonight and a release will be done in the next few days :]

@Grokzen Great! Thanks.

Tested it out manually and works very well :]
A new release should be out very soon after i fix some other stuff.
Many thanks.

@Grokzen My pleasure. Please don't hesitate to @ me if bugs are found.


Using an incorrect dependency version results in misleading error message

I've configured a dependency to elm-community/elm-webgl with an incorrect version. The newest version currently is 3.0.3:
"elm-community/elm-webgl": "4.0.0 <= v <= 5.0.0",

This results in elm package install giving me the following 2 incorrect cases:

If elm-stuff does not exist yet:
Results in error: elm-package: elm-stuff/exact-dependencies.json: openBinaryFile: does not exist (No such file or directory)

If elm stuff does exist:
Tells me some new packages are needed, when I approve it appears to install something but elm-stuff/packages/elm-community/elm-webgl will be empty.

This belongs in https://github.com/elm-lang/elm-package/issues, and almost certainly there is already an issue open about it over there.
Please check, and close here.

Duplicates https://github.com/elm-lang/elm-package/issues/250


ACMG should probably show only ClinVar pathogenic/likely pathogenic variants as default filter.  Need to show variants for Proband, Mother and Father.

Marti suggested into today's meeting that we break the ACMG filters into 'Pathogenic', 'LOF', and 'VUS'.

Our filters are based on the values in ClinVar and we should probably just stick to those, rather than trying to interpret them to other values.


Roberta classificator

Roberta should serve as baseline method for classification. Prepare notebook.

We are prepearing notebooks to work for kaggle competition. Thats why we should have two notebooks one for training stage and one for inference stage, which will be used in kaggle submission.

I know adding configuration file should be in seperate issue, but we should add it here, as the project is small.

Maybe we do not really need configuration at this point yet.

There is some bug when running submission on kaggle.


Script/lint, Lazytox: Fix issue to ignore delete files

Description:
git diff now ignores deleted files for pylint.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#4877
CC: @kellerza

In general, I'm for this fix. But in the lazytox.py script I think we could do better than just ignore deleted files.
Lazytox is supposed to be "intelligent" and automatically run matching tests. For example, deleting homeassistant/components/mqtt/__init__.py would surely invalidate the tests/components/mqtt/test_init.py tests. I think we can do better than that, especially when we have all the awesomeness of python available.
I think a small check in the lint() method for each file would suffice.
# in async def lint(files):
files = [file for file in files if os.path.isfile(file)]

We already test if files exist for pytest and would be nice to do the same for linting, then it also covers the commandline files and uses those for guessing pytest as Otto mentioned

Would have implemented it slightly different. Where pyfiles is created, print a warning for each non existent file and exclude from pyfiles.
But this will work!

Scratch that. We need pyfiles in tact for pytest calcs :-)


Google Speech: passive works, active not

Hi, I use the Google Speech STT since Sphinx only transcribes ['IN'], regardless of what I say.
The STT works when Jasper is waiting for the keyword Jasper, but as soon as I speak the keyword it does not recognize anything.
In passive mode, I get these responses:
DEBUG:client.conversation:Started listening for keyword 'JASPER'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2016-09-04 10:58:47.424520+00:00 (in 29.966131 seconds)
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): www.google.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /speech-api/v2/recognize?lang=en-us&pfilter=2&maxresults=6&client=chromium&key=<API KEY HERE>&output=json HTTP/1.1" 200 None
INFO:client.stt:Transcribed: (u'HELLO', u'HALO', u'HALLO', u'HELLOOOOO', u'HEATHER')
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'

This is what happens when I say 'Jasper':
INFO:client.stt:Transcribed: (u'JASPER', u'CASPER', u'GASPER', u'KASPER', u'CASPAR')
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 504.0
DEBUG:client.tts:Executing aplay -D plughw:0,0 /home/daan/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/daan/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D plughw:0,0 /home/daan/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/daan/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): www.google.com

Then, the system outputs a lot of notifier.scheduler updates. After a while (a few minutes), I get this:
CRITICAL:client.stt:Request failed with http status 502
DEBUG:client.conversation:Stopped to listen actively with threshold: 52.2
DEBUG:client.tts:Saying 'Pardon?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmp6oP4Fr.wav 'Pardon?'
DEBUG:client.tts:Executing aplay -D plughw:0,0 /tmp/tmp6oP4Fr.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmp6oP4Fr.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: www.google.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /speech-api/v2/recognize?lang=en-us&pfilter=2&maxresults=6&client=chromium&key=<API KEY HERE>&output=json HTTP/1.1" 200 None
WARNING:client.stt:Empty response: Nothing has been transcribed.
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'

Why does it fail to connect to the Google service when it's in active mode?

Active mode start after Hi beep.
Did you say anything (command like "What's the weather like today") after Hi Beep ?
With Google Speech free version you will get quota of 50 requests/day and as you are using Google Speech for both Passive and Active mode, there is a chance that your quota will exhaust within minutes.

I did say different things after the high beep. A low beep followed after a few seconds, and then it took a while to get the 502 error.
I did not know about the 50 requests/day, but that wasn't the problem at that moment, since after a restart of Jasper Google's service worked again and started transcribing.

You can check Speech API usage and quota from
https://console.developers.google.com

Try http in stt.py

class GoogleSTT(AbstractSTTEngine):
.........
# ('https', 'www.google.com', '/speech-api/v2/recognize', '',
 ('http', 'www.google.com', '/speech-api/v2/recognize', '',

I'll try that when I'm home, thanks!

I've tried it, but Jasper seems to be completely dead now - both with Sphinx and Google. I've tried all of this on my Raspberry Pi Zero (with the appropriate changes which were described on some Google Forum pages), so maybe I'll reinstall Jasper when I have more time on a Pi 2/3 and see if Sphinx works better than - can't imagine that it'll recognize 'IN' forever..

Google moved from Old Speech API to Google Cloud Speech API.  Mine account (for Speech API) was created long time back and I never face issue with it since long. But few month back when google announced their Google Cloud Speech API, I started facing issues with Old Speech API, that time I changed https to http and it started working again (ofc with limitation of 50 request/day).
Old Speech API will shut down in sometime and Google Cloud Speech API is not supported by Jasper,
ATT-STT also announced a shutdown,
Julius, I dont know if you can use,
Pocketsphinx you can still use.
The only option left for online STT is wit.ai.
Remeber it is owned by Facebook and check thier privacy policy before you start using it.
Btw with Jasper-dev branch you will get one more option for STT, ie KaldiGstServer.

To test Google Speech API, use below script. replace your apikey before use.
https://gist.github.com/G10DRAS/2dae710f9b06e304ba47d85510729a56


No support for .prettierrc.mjs

My project uses .prettierrc.mjs for it's rc file, but it doesn't appear to be getting used by coc-prettier. When I format a document in VIM, it's markedly different than when running prettier from the console.
/** @type {import("prettier").Config} **/
const config = {
	arrowParens: "avoid",
	endOfLine: "lf",
	printWidth: 100,
	trailingComma: "all",
	useTabs: true,
};

export default config;

This is because coc-prettier is on prettier 2.6.2.  Support for esm module config files wasn't added until 3.0 https://prettier.io/blog/2023/07/05/3.0.0.html#api.

https://github.com/neoclide/coc-prettier/pull/172


Full-text button label missing in search-results listing

As indicated in full-text document mock-up, add button label of "Full Text" next to full-text entries in search-results listing

Please see full-text document spec, item 3.