Fixes CODE_OF_CONDUCT link's 404 error

Related Issue

Issue number goes here: #16

Screenshots
Now after this change the error has gone

@Ansalpandey Thank you, I'll merge it.

@Ansalpandey Can you do another PR filling your name and email in CONTRIBUTORS?


in website blocker there are no passwords protection when it say there is one.

The password function is a strange one.  It is not what you might expect: setting a security password to prevent unauthorized users editing the blocked list.  Instead the password function generates a long random string of characters to be typed to allow viewing of a blocked site for five minutes.  I think this is a useless function, personally.


Split the Ably wrapper interface into two interfaces

We could split the Ably interface into AblyPublisher and AblySubscriber interfaces. Thanks to this we would hide the methods that are not needed for the given SDK. As a lot of methods will be shared it might be good to create another interface which would be called AblyCommon that would contain all the shared methods to avoid duplication.
 Whereas Common would contain only connect/disconnect ones?

The names Subscriber and Publisher are used to show which part of the SDK uses the wrapper. If there is a method that's used by both of them then it goes to the Common one :wink: For example, both SDKs need to receive and handle presence messages, therefore, the subscribeForPresenceMessages() method is in the Common interface.


docs: Clean up install_linux with pip

Cleans up the 'How to Install TensorFlow' section using pip in virtualenv and system. Uses virtualenv in a typical workflow.
Fixes #18767

Staged: go/tfo-stage/install/install_linux

Updated your suggestion to include python3 -V
Before I leave this doc, I went ahead and moved the GPU section that started the doc below the installation procedures. It seemed a little off putting right at the start, especially since we recommend installing the CPU version to start.


feat: cool cheatcode

Motivation

Closes #1340.
Motivation is wanting to have more accurate and easier gas tests in foundry without needing to do hacks around functions/setUp. Adds a cheatcode to reset a warm account to cold and it's storage to be untouched/cold via vm.cool(address)
Solution

not familiar with the language/code so maybe some things are pretty wrong, would love some guidance on what to change or if something is missing!

it untouches the Account.status and clears all storage cache in the Account via Account.storage
also had some code relating to removing the JournalEntry for JournalEntry::StorageChange but it wasn't necessary for this to work in the tests i wrote - so i don't know if it's supposed to be cleared or not but it's not effecting how the gas is calculated at least in this basic test?
i'm not sure the best way to test other than via gasleft - instead of hardcoding gas values that may change it just asserts that the same calls have the same gas values and the warm call is less gas. i wrote a few more tests using sstore (20k for zero to non zero and 5k for nonzero to nonzero) but wasn't sure it was necessary
(didn't account for refunds if that is related, since gasleft doesn't do it)
see also: twitter context

let's also remember to update the book! @ditto-eth

yep already have a commit haha!

see https://github.com/foundry-rs/foundry/pull/5852 for my new PR


Support for Scholte wave inversion

Hi Keurfon,
More and more (including myself) people are looking into Scholte wave inversion, especially for fiber cables in the ocean.
Do you think it would be possible to extend the forward modeling/inversion to include cases where the first layer is water (S-wave = 0)?
If I just try setting Vs=0,Vp=1.5km/s,rho=1 gr/cc for the test model you provide, I get an error that seems to be coming from the Herrmann library.
Thanks!!!
Ariel

HI @ariellellouch,
I tested disba's example with a water layer, and the forward modeling seems to be working:
import numpy as np
from disba import PhaseDispersion
import matplotlib.pyplot as plt

velocity_model = np.array([
   [5.0, 1.5, 0.0, 1.00],
   [10.0, 7.00, 3.50, 2.00],
   [10.0, 6.80, 3.40, 2.00],
   [10.0, 7.00, 3.50, 2.00],
   [10.0, 7.60, 3.80, 2.00],
   [10.0, 8.40, 4.20, 2.00],
   [10.0, 9.00, 4.50, 2.00],
   [10.0, 9.40, 4.70, 2.00],
   [10.0, 9.60, 4.80, 2.00],
   [10.0, 9.50, 4.75, 2.00],
])
t = np.logspace(0.0, 3.0, 100)

pd = PhaseDispersion(*velocity_model.T)
cp = pd(t, mode=0, wave="rayleigh")

plt.semilogx(cp.period, cp.velocity)

But indeed, water layers are not supported yet in evodcinv (it's not possible to set Vp). For the water layer, I guess we are only looking for its thickness (Vp and density are known I guess).

It also works for me in disba, which is already super useful!
I think this is a reasonable assumption - changes in water velocity/density are very small and would require multiple layers.
Maybe adding a flag of "first_layer_water" or something like that would be a good wraparound without opening the option to change Vp for the inversion?
Ariel

Hi @ariellellouch,
Please update to v2.2.2. The fix was pretty straightforward in the end, I simply added a condition when transforming the model parameter vector to a velocity model. The first layer's Vp is determined by its Vs as follows:

if Vs > 0, Vp determined using Poisson's ratio (no water layer)
if Vs = 0, Vp = 1.5 km/s (default value)
if Vs < 0, Vp = -Vs km/s

import numpy as np
import matplotlib.pyplot as plt

from disba import PhaseDispersion
from evodcinv import EarthModel, Layer, Curve, factory

# Generate synthetic data
velocity_model = np.array([
   [5.0, 1.5, 0.0, 1.0],
   [30.0, 4.6, 2.6, 2.0],
])
f = np.linspace(0.05, 1.0, 100)
t = 1.0 / f[::-1]
pd = PhaseDispersion(*velocity_model.T)
cp = pd(t, mode=0, wave="rayleigh")

# Set up model
model = EarthModel()
model.add(Layer([3.0, 7.0], [-2.0, 1.0]))  # Invert for water layer's Vp or first layer's Vs
# model.add(Layer([3.0, 7.0], 0.0))  # Fix Vp to default value (1.5 km/s)
# model.add(Layer([3.0, 7.0], -1.45))  # Fix Vp to 1.45 km/s
model.add(Layer(30.0, [1.5, 3.5]))

model.configure(
    optimizer="cpso",
    misfit="rmse",
    density=lambda vp: 2.0,
    optimizer_args={
        "popsize": 10,
        "maxiter": 200,
        "workers": -1,
        "seed": 0,
    },
)
curves = [Curve(cp.period, cp.velocity, 0, "rayleigh", "phase")]

# Invert
res = model.invert(curves)
print(res)

--------------------------------------------------------------------------------
Best model out of 2000 models (1 run)

Velocity model                                    Model parameters
----------------------------------------          ------------------------------
         d        vp        vs       rho                   d        vs        nu
      [km]    [km/s]    [km/s]   [g/cm3]                [km]    [km/s]       [-]
----------------------------------------          ------------------------------
    5.0274    1.4991    0.0000    1.0000              5.0274   -1.4991    0.3243
    1.0000    4.7551    2.5827    2.0000                   -    2.5827    0.2908
----------------------------------------          ------------------------------

Number of layers: 2
Number of parameters: 5
Best model misfit: 0.0001
--------------------------------------------------------------------------------

That's a great solution!
Thanks


rres support

Hi there, is it hard to add rres to the bindings? It's a couple of header files to work with raylib packing library. Thanks in advance.

You should be able to just @cImport/@cInclude the official implementation.


[BUG] Error: documentStoreServices.insertIntoVectorStore

Describe the bug
I am working with Document store connected to Postgres. When trying to Upsert I am getting the following error:
Status: 500
Error: documentStoreServices.insertIntoVectorStore - Error: documentStoreServices._insertIntoVectorStoreWorkerThread - Error: 401 status code (no body)
Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MODEL_AUTHENTICATION/
I worked before. No there were not configuration changes. Restart of all services does not helped
To Reproduce
Steps to reproduce the behavior:

Go to Documents stores
Open one of document store
Click more actions
Click Upsert All chunks
Check configuration
Click upsert

Expected behavior
Data stored correctly in db
Screenshots
N/A
Flow
N/A
Setup

Installation Azure Containrer Instance according to manual from Page
Flowise Version 2.2.1
OS: Linux
Browser Chrome

Additional context
N/A

There was some bug around upserting on 2.2.1, can you try the latest v2.2.2?


Importing own network (Windows 10)

Hi,
I tried to import my own network with the build-in function in ABStreet and the command line function. I tried the .37 .38 .39 version and all result in crashes or very long time (30 mins) with no CPU or GPU usage. I am using a small area of the NYC Manhattan as a test.
Using the build-in function in ABStreet have no log in text box. Just have the timer of loading time. The log is attached
0.38 output.txt
I let it ran for over 30 mins and gave up. Here is the log
0.39 output.txt
Using command line function result in the following screen cap:

It looks like importer fails immediately because some of those commands aren't found, but the UI doesn't pick up the failure. I'll work on fixing both problems.
Since the fix won't be available before next Sunday's release, in the meantime, we're importing part of Manhattan now. You could try the "Download more cities" button and select "us/nyc", or on the web: http://abstreet.s3-website.us-east-2.amazonaws.com/0.2.39/abstreet.html?--dev&system/us/nyc/maps/lower_manhattan.bin

Hmm, I can't figure out why the UI doesn't see the failure. If I force importer to crash, the error shows up in the UI immediately. https://github.com/a-b-street/abstreet/blob/master/map_gui/src/tools/command.rs uses crates.io/crates/subprocess, and there must be some differences between Windows and Linux+Mac. I'll keep poking around.
The root problem is that importer demands those 3 commands exists, even though it shouldn't need to use any of them. I'll fix that.

I've fixed the main issue but discovered another: when the importer prints warnings, sometimes those happen to wind up after one_step_import prints the map name. The whole process uses the very last line of output to figure out what the new map is called. This is brittle! I'll use a different way to communicate that back.

I believe all of the problems have been fixed; everything will be available in the next release this Sunday. Thanks so much for reporting, and let me know if you hit any other problems!


Pitch detection

Since the pitch is important in translating languages such as mandarin, we want a pitch detection algorithm. See also notebook.
We implement this using normalized cross-correlation function (NCCF) and median smoothing, mentioned in RAPT. Kaldi also uses NCCF, but uses an algorithm based on viterbi instead of median smoothing for smoothing, see here.

[x] Both pure tones from here are detected successfully.
[x] Move out of example

Closes #257

Would these transforms already work with @torch.jit.script ? :)

Would these transforms already work with @torch.jit.script ? :)

Yup :)

What's the difference between this and something like CREPE, pYIN and SPICE? Which is best to use for a typical voice-over?

What's the difference between this and something like CREPE, pYIN and SPICE? Which is best to use for a typical voice-over?

The algorithm included here is a non-neural-network algorithm (based on RAPT, and related to Kaldi's) to identify pitch that can be used as a baseline. The algorithms you mention look promising, but I'd simply experiment and find what's best for a particular case :)


Template content stripping (silently)

Description
Related to #5155.
(Nested) template content vanishes.
class MyApp extends PolymerElement {
  static get template() {
    return html`Template: <template><div>content</div></template>`;
  }
  ready() {
    super.ready();
    const template = this.shadowRoot.querySelector("template");
    this.shadowRoot.appendChild(document.importNode(template.content, true));
    console.log("template content:", template.content.innerHTML);
  }
}

should result in an shadow element with textContent: "Template: content".
Is that a valid assumption or is my intuition flawed?
If it's indeed the correct behavior then how am I supposed to use templates in my custom Polymer element? (Maybe add a little hint in the docs.)
Live Demo
https://jsbin.com/dahutoh/edit?html,output,console
Steps to Reproduce

Use my-app (static template method gives template (T1) with nested template (T2) inside)
Append my-app to document.body or preexisting my-app

Expected Results
T2 should contain the content specified in the T1-string
Actual Results
T2 is empty
Browsers Affected

[x] Chrome
[ ] Firefox
[ ] Edge
[ ] Safari 11
[ ] Safari 10
[ ] IE 11

Versions

Polymer: v3.0.5
webcomponents/shadycss: v1.5.2

Described here: https://www.polymer-project.org/3.0/docs/devguide/dom-template#preserve-template-contents.
The docs say that it's a rare use-case.
Does that mean that I can't use dom-repeat in the template because it relies on template?

To the dom-repeat question: https://www.polymer-project.org/2.0/docs/devguide/templates#dom-repeat
BTW: Despite my own carelessness it's really easy to get lost in the vast docs of the different polymer versions.


fix: invite modal display on android not taking up whole screen height

Description
As the title says
Other changes
Vertical padding on the NFT banner. Before -> after

Tested
Manually
How others should test
Verify that https://github.com/valora-inc/wallet/issues/2852 cannot be reproduced.
Related issues

Fixes #2852

Backwards compatibility
Yes

Hey @MuckT, We have verified above issue on Latest Android Internal Release Build V1.41.0 & Test Flight Release Build V1.41.0 and updated status in test rails.
Observations:

User is not able to see green colored line when user A is trying to send invite to User B and also user is not able to see review button on send invite link page

Test rail link:
Android 10: https://valoraapp.testrail.io/index.php?/tests/view/74597
Android 12: https://valoraapp.testrail.io/index.php?/tests/view/74628
iOS 12: https://valoraapp.testrail.io/index.php?/tests/view/74659
Devices: Google Pixel 4a (12.0), Galaxy M31(10.0), iPhone 6+(12.5.5)
CC: @kathaypacific
Thanks..!!


Perplexity Calculations for TOVA Cache

For the perplexity calculations, I am trying to replicate the performance reported using TOVA with 512 cache size on 4096 token splits of PG19.
Was the perplexity calculated with one forward pass like so:
with torch.no_grad():
    output = model(chunk_input, past_key_values=cache)
    logits = output.logits
    shift_logits = logits[..., :-1, :].contiguous()
    shift_labels = labels[..., 1:].contiguous()
    loss = F.cross_entropy(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1), reduction='none')
    average_perplexity = torch.exp(torch.mean(loss))

or iteratively:
loss = 0.0
num_tokens = 0
for token_idx in tqdm(range(0, chunk_input.size(1) - 1)):
    input_ids = chunk_input[:, token_idx:token_idx+1]
    with torch.no_grad():
        output = model(input_ids, past_key_values=cache)
        logits = output.logits
        token_loss = loss_fn(logits.view(-1, logits.size(-1)), chunk_input[:,token_idx+1:token_idx+2].view(-1))
        loss += token_loss
        num_tokens += 1
average_perplexity = torch.exp(loss / num_tokens)

Thanks!

Hi Kevin,
Thank you for asking. We perform cache reduction to the pre-defined size after applying the attention mechanism of each layer. Therefore, feeding the model the whole sequence at once will give you identical results to the model without using TOVA. To evaluate TOVA, you should pass the model one token at a time, just like it seems you do in your iterative (2nd) option.
One important implementation note: due to some assumption in the transformers library, the positioning is done incorrectly for our cache. We've fixed it for model.generate(), but to make the direct model call work properly, you should pass the positions explicitly. Hence, the model call would look like this:
output = model(input_ids, position_ids=torch.tensor([[token_idx]]), past_key_values=cache)
Good luck!

Great, that seems to be working! Also, for the perplexity calculations, did you average the batch perplexity or calculate overall perplexity by keeping track of running loss and tokens evaluated over the batches?
Thanks!

Hi Kevin,
About the perplexity calculations: we used the overall loss (over all the batches) to calculate the perplexity (i.e.: the second option in your comment).
Thanks,
Michael

Hi Kevin,
About the perplexity calculations: we used the overall loss (over all the batches) to calculate the perplexity (i.e.: the second option in your comment).
Thanks, Michael

Hi, I'm not able to reproduce the ppl results on PG19 testset.
The code I used to calculate the ppl of one sample in PG19 is pasted below:
  past_key_values = TOVACache(multi_state_size)

  for idx in tqdm(range(0, seq_len - 1)):
              input_ids = encodings.input_ids[:, idx : idx + 1].to(model.device)
              with torch.no_grad():
                  outputs = model(input_ids, past_key_values=past_key_values, use_cache=True)
                  logits = outputs.logits.view(-1, model.config.vocab_size)
                  past_key_values = outputs.past_key_values
                  label = encodings.input_ids[:, idx + 1 : idx + 2].to(logits.device).view(-1)
                  token_loss = loss_fn(logits, label)
              nlls.append(token_loss)
  ppl = torch.exp(sum(nlls) / len(nlls))```

Thanks,

Ziwei

Hi Kevin,
About the perplexity calculations: we used the overall loss (over all the batches) to calculate the perplexity (i.e.: the second option in your comment).
Thanks, Michael

Hi, I'm not able to reproduce the results on PG19. The code I used to get the ppl of one sample in PG19 is provided below:
enable_tova_caching(model)
past_key_values = TOVACache(multi_state_size)
nlls = list()

for idx in tqdm(range(0, seq_len - 1)):
    input_ids = encodings.input_ids[:, idx : idx + 1].to(model.device)
    with torch.no_grad():
        outputs = model(input_ids, past_key_values=past_key_values, use_cache=True)
        logits = outputs.logits.view(-1, model.config.vocab_size)
        past_key_values = outputs.past_key_values
        label = encodings.input_ids[:, idx + 1 : idx + 2].to(logits.device).view(-1)
        token_loss = loss_fn(logits, label)
    nlls.append(token_loss)
ppl = torch.tensor(nlls).mean().exp().item()

Is there an error in my approach? Thanks, Ziwei

You would probably have to adjust your model forward call to this:
outputs = model(input_ids, position_ids=torch.tensor([[idx]]), past_key_values=past_key_values, use_cache=True)

Hi Kevin,
About the perplexity calculations: we used the overall loss (over all the batches) to calculate the perplexity (i.e.: the second option in your comment).
Thanks, Michael

Hi, I'm not able to reproduce the results on PG19. The code I used to get the ppl of one sample in PG19 is provided below:
enable_tova_caching(model)
past_key_values = TOVACache(multi_state_size)
nlls = list()

for idx in tqdm(range(0, seq_len - 1)):
    input_ids = encodings.input_ids[:, idx : idx + 1].to(model.device)
    with torch.no_grad():
        outputs = model(input_ids, past_key_values=past_key_values, use_cache=True)
        logits = outputs.logits.view(-1, model.config.vocab_size)
        past_key_values = outputs.past_key_values
        label = encodings.input_ids[:, idx + 1 : idx + 2].to(logits.device).view(-1)
        token_loss = loss_fn(logits, label)
    nlls.append(token_loss)
ppl = torch.tensor(nlls).mean().exp().item()

Is there an error in my approach? Thanks, Ziwei

You would probably have to adjust your model forward call to this: outputs = model(input_ids, position_ids=torch.tensor([[idx]]), past_key_values=past_key_values, use_cache=True)

Hi Kevin, thank you for your quick reply, unfortunately it's not gonna work when the idx exceeds 4096.


Can't access with authentication

I am trying to access mongo with authentication. I created a docker image then ssh into it once it was up and running. I had set the username and pass with the flags MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD within the docker-compose.yml file. I then tried the authentication command with the specified values and I got an error authenticating. Any idea what I am doing wrong here?
docker-compose.yml
services:
  mongo-server:
    container_name: mongo-server
    image: mongo:4.4.2
    restart: always
    ports:
      - "27017:27017"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=admin
    volumes:
      - mongo-data:/data/db

in docker instance
db.auth("root", "admin")

which returned:
Error: Authentication failed.

Can you give all the commands you ran and any relevant files or logs for reproducing the issue
You may have missed the --authenticationDatabase admin on the connection incantation
$ docker-compose up -d
Creating network "root_default" with the default driver
Creating volume "root_mongo-data" with default driver
Creating mongo-server ... done

$ docker run -it --rm --network=root_default mongo:4.4.2 bash

root@54a879f19a56:/# mongo --host mongo-server -u root -p admin --authenticationDatabase admin
MongoDB shell version v4.4.2
connecting to: mongodb://mongo-server:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("eaf9c7b8-2565-40e2-b5c0-c11a0ad447c9") }
MongoDB server version: 4.4.2
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        https://docs.mongodb.com/
Questions? Try the MongoDB Developer Community Forums
        https://community.mongodb.com
---
        Enable MongoDB's free cloud-based monitoring service, which will then receive and display
        metrics about your deployment (disk utilization, CPU, operation statistics, etc).

        The monitoring data will be available on a MongoDB website with a unique URL accessible to you
        and anyone you share the URL with. MongoDB may use this information to make product
        improvements and to suggest MongoDB products and deployment options to you.

        To enable free monitoring, run the following command: db.enableFreeMonitoring()
        To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---
> show dbs
admin   0.000GB
config  0.000GB
local   0.000GB

So with the relevant .yml file attached above, I ran:
docker-compose up -d
Then I tried your command without the network because I don't have that network:
docker run -it --rm mongo:4.4.2 bash
Then I ran: mongo --host mongo-server -u root -p admin --authenticationDatabase admin
and got:
root@527aef382986:/#
MongoDB shell version v4.4.2
connecting to: mongodb://mongo-server:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server mongo-server:27017, connection attempt failed: HostNotFound: Could not find address for mongo-server:27017: SocketException: Host not found (authoritative) :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1

The network that docker-compose up makes would be shown in the command output. I used a separate container to show the "external" connection succeeds. This wouldn't be possible without them both being on the same Docker network
$ docker-compose up -d
Creating network "root_default" with the default driver
Creating volume "root_mongo-data" with default driver
Creating mongo-server ... done

I was using https://labs.play-with-docker.com for my example

So I see the creation of the network but I don't see the creating volume "root-mongo-data" with default driver

Yeah it won't show if the volume's already created
$ docker-compose down
Stopping mongo-server ... done
Removing mongo-server ... done
Removing network root_default

$ docker-compose up -d
Creating network "root_default" with the default driver
Creating mongo-server ... done

You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow.
I hava a question,why are me need login first,I want mongo connect first ,and then db.auth('root','passwd');

mongo --host mongo-server -u root -p admin --authenticationDatabase admin
In my docker-compose env,I hava meet some question,by you answer,I user 'mongo -u root -p admin --authenticationDatabase admin' login mongo.
I hava a question,why are me need login first,I want mongo connect first ,and then db.auth('root','passwd');

Oh no,but just now,first ,I connect mongo by 'mongo',and then ,switch db 'use  admin',finally login ' db.auth('root','passwd')', Wow,this is really a distressing story!


Installation has some warinings

Hi Dan,
Today a migrated to the lastest master build. I saw that the package.json file was modified and removed yarn.lock and node_modules directory/ in the hope the swagger warning were solved.
but i still have them on install. I know this not a big issue as it works but still can be adressed.
yarn install v1.22.4
info No lockfile found.
[1/4] Resolving packages...
warning ari-client ><EMAIL_ADDRESS>No longer maintained, please upgrade to swagger-client@3.
warning ari-client ><EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
warning ari-client > swagger-client > shred ><EMAIL_ADDRESS>The sprintf package is deprecated in favor of sprintf-js.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 66.47s.

I am not sure if moving to swagger 3 will break the dialogflow code and have not tested it yet.
The other two packages i believe are linked so not sure if we can ignore these.
We can address this later as it has no further impact but i would look nice if there were no warnings 😃

nothing we can do about swagger unfortunately. Thats an underlying issue in the node lib for the ARI. request and sprintf should be addressed but inside the node lib for the ARI, not here

Update: I removed the full directory and git cloned it again. Then it works with no warnings 😕

lol, that erm... makes no sense!

I will close this with my head scratched


update aml component spec

Description

Related Issues

Checklist:

[ ] I have followed the contribution guidelines and code style for this project.
[ ] I have added tests covering my contributions.
[ ] I have updated the documentation accordingly.
[ ] This PR is being made to staging and not master.

@miguelgfierro , please kindly help review:)


Define groups of subject that share common predicates

Follow-up to the discussion in https://github.com/cdevents/spec/pull/26#discussion_r804553471
The spec now distinguishes subjects as:

long running, which stay in a running state until they're purposely stopped or
encounter a failure or a condition that prevents them from running - for
example a service, an environment, an artifact or a source change
run to completion, which independently stop after they accomplished (or
failed to) a specific task, or encounter a failure or a condition that
prevents them from continuing - for example a task run, a build or a test

The terminology does not work for all subjects though, for instance artefacts are not "running".
Some alternatives:

service vs. job / batch
permanent vs ephemeral / temporary subject
add a third category for artefacts

Related to #51 - we should try and do these two in the same version of CDEvents.


Toggle dark/light

I wrote a bash script to toggle between the dark and light color option, since, unless I'm being boneheaded, I think doing so depends on knowing the current value. I'm currently doing it the most hacky way possible, calling wal with a wrapper script and recording the presence of the -l short option.
Twofold question:
a) Would it make sense for this to be a feature request?
The first thought I have is allowing -l to take a true/false argument. This should be nonbreaking to the current interface.
b) If not, is there a clever way to detect the current setting? My understanding is one would just read the cached colors and compare color0 to color7?
Thanks!
Cora

wal -R for dark and wal -R -l for light. These commands toggle between light/dark for the current wallpaper.
If you’re looking for a single command to toggle I’ll implement this when I get home. (I’m on holiday right now)

A single command was my intention, yes. Thanks!


Tutorials: It's not clear that each tutorial should have its own project

When following the practical tutorials, it's not clear whether it should be made in different projects, so I started making all of them in the same project until I realised that some services like "ui" were being overwritten in the subsequent tutorials deployments.
Perhaps the docs should inform the user that he must create a new project or instead, make unique service names for each tutorial.

Maybe we chould change this text to something like this:
"Note: make sure to replace projectID with the ID that you'd like for this project."

Hmm, I don't know... it looks like it wouldn't be enough for one to see that he can't make all the tutorials in the same project.

I'm wondering if this is more of an edge case. You ran into the issue because you were doing multiple tutorials sequentially. My assumption is that most users will be doing just one tutorial. Would you agree?

Yeah, I could agree that it could be an edge case, but I think we could easily avoid these edge cases to happen again.
I have some suggestions, we could apply only one or more than one, whatever:

In each tutorial we suggest a project name instead of always "projectID". For example:

we deploy -p myauthproject

Use unique service names, like "authui", "dataui", etc.

Inform the user that if he already have services with the same name in the project, it will be overwritten

But, it's only based on my impressions of what happened during my tests.

Thanks @ricardofunke, we'll think of a better solution for this. Closing for now


Team Wars

What is the feature request for?
Add a war system where we can go to war with other teams with our allies . If our or our allies teams kills someone from the oppent team then we get 2 points otherwise if there member dies we get one point. The war ends when one team gets a 100 points or 1 team ends the war(it will reduce some points). You can add more things if u want and i said 1 points if the person wasn't slain because we can kill them with traps and lava etc. which normally don't count.
Relevant links
No response
Additional Information
No response
Feature requests are not going to be implemented by booksaw, instead you will have to find another developer to make a pull request to implement the feature.

[X] I understand

Hello i made Something near this but this is time based the wars take a time and allies decide to open a war and use the same command to open the war cause on my own server we have a grief rule if not inside war so
-/startwar enemyteamplayer howmuchminuteswillwarwentfor
-/warlist
So the war finishes and its manually started because i believe auto start can be stupid when u accidently hit/kill a friend u were gonna take to a team

Its using Better Teams api as a dependency so the plugin is dependant on betterteams, if you need it i will think about sharing it on spigot

Yes if u can put in on spoigot it will be great.
On Thu, 14 Dec, 2023, 11:34 pm Turgut Harun Arslan, <
@.***> wrote:

Its using Better Teams api as a dependency so the plugin is dependant on
betterteams, if you need it i will think about sharing it on spigot
—
Reply to this email directly, view it on GitHub
https://github.com/booksaw/BetterTeams/issues/526#issuecomment-1856340590,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV3IGTYE4WRAJQLDZIBMSCLYJM5UXAVCNFSM6AAAAABAHNNJGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJWGM2DANJZGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Yes if u can put in on spoigot it will be great.
…
On Thu, 14 Dec, 2023, 11:34 pm Turgut Harun Arslan, < @.> wrote: Its using Better Teams api as a dependency so the plugin is dependant on betterteams, if you need it i will think about sharing it on spigot — Reply to this email directly, view it on GitHub <#526 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3IGTYE4WRAJQLDZIBMSCLYJM5UXAVCNFSM6AAAAABAHNNJGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJWGM2DANJZGA . You are receiving this because you authored the thread.Message ID: @.>

Yep I'll upload to spigot then after some fixes of bugs :)

Yes if u can put in on spoigot it will be great.
…
On Thu, 14 Dec, 2023, 11:34 pm Turgut Harun Arslan, < @.> wrote: Its using Better Teams api as a dependency so the plugin is dependant on betterteams, if you need it i will think about sharing it on spigot — Reply to this email directly, view it on GitHub <#526 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3IGTYE4WRAJQLDZIBMSCLYJM5UXAVCNFSM6AAAAABAHNNJGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJWGM2DANJZGA . You are receiving this because you authored the thread.Message ID: @.>

Hello this is the plugin link on spigot: https://www.spigotmc.org/resources/team-wars.113973/


Board need to support the KubeEdge

In GitLab by @luotian-github on May 12, 2020, 04:27
Board need to support the KubeEdge for edge-computing

In GitLab by @luotian-github on May 12, 2020, 04:27
assigned to @luotian-github

In GitLab by @luotian-github on Jul 2, 2020, 09:27
implemented

In GitLab by @luotian-github on Jul 20, 2020, 01:16
release 7.3

In GitLab by @luotian-github on Jul 20, 2020, 01:16
closed


运行用例提示错误result.tb_locals = self.tb_locals

安装成功后，运行任何用例都是提示如下错误：
Michael@MichaeldeMacBook-Pro:~/Downloads/ApiTestEngine-0.2.2$ ate test.yml
Traceback (most recent call last):
File "/usr/local/bin/ate", line 9, in
load_entry_point('ApiTestEngine==0.2.2', 'console_scripts', 'ate')()
File "build/bdist.macosx-10.11-x86_64/egg/ate/cli.py", line 53, in main
File "/Users/Michael/Downloads/ApiTestEngine-master/src/pyunitreport/PyUnitReport/runner.py", line 42, in run
result.tb_locals = self.tb_locals
AttributeError: 'HTMLTestRunner' object has no attribute 'tb_locals'

bugfixed.


feat: support configuring preprocessorOptions with function.

Suport configuring preprocessorOptions with function.

Additional context

When importing style files of different UI frameworks, like ant-design,  the global vars may lead to conflict.
This pr support configure preprocessorOptions with function.
Site Effect: It can overwrite the builtin options like includePaths and alias.
What is the purpose of this pull request?

[ ] Bug fix
[x] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the PR Title Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Ideally, include relevant tests that fail without this PR but pass with it.

Thanks for the proposal. I added the PR to the team board so we get to discuss it in a future meeting (there is a backlog so I don't expect we'll get to this one soon though).
Personally, I would prefer not to add extra complexity to CSS preprocessors.
alias and includePaths could already be overwritten, I don't understand the Side Effect note.

I read wrong, please ignore the ‘side effect’ part.

As sapphi-red said that  additionalData is enough. Maybe this pr is useful in other rare situation, but till now , vite works good  enough.


Why multiply here?

https://github.com/kkakkkka/ETRIS/blob/78ede06384aa494ac9c55aff6f71f625a443c440/model/layers.py#L342
Excuse me, but could you give some explanation on this line? Generally, the residual connection uses add operation, but why here multiply?

Hi~ Have you resolved it？

Yes, residual connections are typically used to facilitate the training of deep networks by adding the input to the output of a layer. This is done to prevent the "vanishing gradient" problem, in which the gradients become too small as they propagate back through many layers, making it difficult for the network to learn.
Multiplication can be applied to certain types of operations. In our approach, the attention mechanism is expected to learn how to prioritize certain parts of the input over others. Multiplication can also be used to represent the interactions between features. Multiplication could be a method to combine these aspects in a non-linear manner, which could capture more complex relationships than simple addition.
We chose multiplication based on preliminary empirical results. We encourage you to experiment with both addition and multiplication in your own implementation to determine which approach yields the best results for your particular dataset and task.


windows: ImportError: DLL load failed: The specific module could not be found

For now error is mainly encounter when one is building the package from source but not when installing from CI-generated wheels. Need more tests to make sure.
Possible solution can be found here:

cibuildhweel doc

tl;dr:
missing some dll from MSVC, one should install all the available Visual C++ Redistributable from the official website. If still not enough one should test compilation with extra flag /d2FH4-

👋 @CherifMZ
you can have a look when you have the time, if installing the Redistributable are not enough I will try to integrate the flag to the build later on


TableSelectDialog does not work with OData v4 Model, on selecting an item

OpenUI5 version:1.48.5
Browser/version (+device/version):Chrome 56.0.2924.87 (64-bit
sap,m.TableSelectDialog in not working when selecting an item from ODataModel v4, throws error
ListBase->ListBase.prototype.getSelectedContexts()
return oModel.getContext(sPath);

throw new Error("Unsupported operation: v4.ODataModel#getContext");
What is the expected result? selecting only a Item
What happens instead? emit the error above
Any other information? the property rememberSelections of TableSelectDialog is not being initialized on:
this._oTable = new Table(this.getId() + "-table", {
		growing: true,
		growingScrollToLoad: true,
		mode: sap.m.ListMode.SingleSelectMaster,
		modeAnimationOn: false,
		infoToolbar: new sap.m.Toolbar({
			visible: false,
			active: false,
			content: [
				new sap.m.Label({
					text: this._oRb.getText("TABLESELECTDIALOG_SELECTEDITEMS", [0])
				})
			]
		}),

If you put 		rememberSelections:false on supporting  oTable the TableSelectDialog works as expected.

Duplicate of #1689 and #1616, fixed in 1.50.
Fix can verified against https://openui5nightly.hana.ondemand.com/ .


SpaceEngine: Avoid constructing disjunct spaces whenever possible

Switch to using factory methods to construct spaces, and then take advantage of that to centralize a small optimization around disjunct spaces. No intended user-visible change.

@swift-ci Please test

@swift-ci Please test source compatibility


Document how to create new subsegments inside a ThreadPoolExecutor thread

The current documentation shows how to set the parent thread's X-ray entity in the worker thread:
def load_url(url, trace_entity):
    # Set the parent X-Ray entity for the worker thread.
    xray_recorder.set_trace_entity(trace_entity)
    # Subsegment captured from the following HTTP GET will be
    # a child of parent entity passed from the main thread.
    resp = requests.get(url)
    # prevent thread pollution
    xray_recorder.clear_trace_entities()
    return resp

However it's not clear how this interacts with capture/in_segment. For example, I assume this isn't correct, as the capture starts before we call set_trace_entity:
@xray_recorder.capture('subsegment_name')
def load_url(url, trace_entity):
    # Set the parent X-Ray entity for the worker thread.
    xray_recorder.set_trace_entity(trace_entity)
    # Subsegment captured from the following HTTP GET will be
    # a child of parent entity passed from the main thread.
    resp = requests.get(url)
    # prevent thread pollution
    xray_recorder.clear_trace_entities()
    return resp

However, are these two OK?
def load_url(url, trace_entity):
    # Set the parent X-Ray entity for the worker thread.
    xray_recorder.set_trace_entity(trace_entity)
    with xray_recorder.capture('subsegment_name'):
        # Subsegment captured from the following HTTP GET will be
        # a child of parent entity passed from the main thread.
        resp = requests.get(url)
    # prevent thread pollution
    xray_recorder.clear_trace_entities()
    return resp

def load_url(url, trace_entity):
    # Set the parent X-Ray entity for the worker thread.
    xray_recorder.set_trace_entity(trace_entity)
    with xray_recorder.in_segment('segment_name') as segment:
        segment.put_metadata('key', dict, 'namespace')
        # Subsegment captured from the following HTTP GET will be
        # a child of parent entity passed from the main thread.
        resp = requests.get(url)
    # prevent thread pollution
    xray_recorder.clear_trace_entities()
    return resp

It would be great if the docs on threading had a more complete example.

Hey there!
I'm not the most familiar with this X-Ray Python SDK, but I'll try to answer your question.
Based on what I see, both your solutions make sense and to as far as I can tell they should work. Your example of something that doesn't work also makes sense to me. Have you tried it in the X-Ray console and do you notice it doesn't work? If that's the case please include screenshots of what you see versus what you expect!
Otherwise, we also recommend you use the OpenTelemetry Python SDK. It has tons of features and I found an example with ThreadPoolExecutor to ensure spans are parented correctly. You'll find lots of support there and AWS announced GA support for its traces 1 year ago.
We're happy to review PRs for improvements to our documentation! If you open one someone from our team will check out as soon as we are able to 🙂


typescript typings

 ✘  ~/projects/react-hipstaplate   master ●✚  ya @types/next-routes
yarn add v0.28.4
[1/5] Validating package.json...
[2/5] Resolving packages...
error Couldn't find package "@types/next-routes" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

I don't know if anyone else has worked on trying to create the TS definitions for this lib yet, but I ran into a wall when trying to expose the Link class as a named export. I'm thinking it may have to do with the API design as mentioned in #63. It may be best to wait until those changes are made before continuing with these definitions.
Is there any opposition to maintaining the TS definitions in this repo, or is the preference to keep them in the DefinitelyTyped repo?

Yeah, I spent a good few hours trying to make this work and gave up in the same place :/

I just opened #153 to get typings included in this project :)

Thanks @disintegrator


0.9.0: related.list / toc problems

Not sure for where the problem come, but i have
"toc": {
  "render": true,
  "method": "preWrite",
  "maxdepth": 4
}

and when ran verb --config related.list:... it overrides the toc option to true.
Again, not sure enough. Before didn't have such problems and don't know from when it is (if it is actual bug)

really? that's strange.

do you have a global config? this would still be a bug, but is there a chance that verb is somehow merging your global config over the local config?
Also, try using a = as a separator:
$ verb --config=related.list:foo,bar,baz

do you have a global config?

I believe i deleted them with ~/.dat* (date-store and data-store)
But yea, I'll try in clean folder and no global config, and i'll back.

Yea, still resets the toc option, even after deletion of global stores.
https://asciinema.org/a/0xbhmy7egjfbacd8uapzbdllj

Ok, that makes it easier thx. I was hoping it was just a glitch in verb itself, probably in the task logic or how the defaults are setup. This at least means that the global config isn't related to the issue

@jonschlinkert do you know from where problem comes to navigate me so i can PR, cuz it is very weird. Moreover when I almost every day publish new package. ;d

it still does this?

do you know from where problem...

No, not yet. But I suspect it comes from base-cli-process or base-cli-schema (probably the former).

it still does this?

yea

But I suspect it comes from

ookey, i'll look what's up there, thanks

I believe that the problem is somewhere here base-cli-process/index.js#L50-L58. It seems that the passed obj to the var fn = this.cli.process is not correct, but the opts is correct. So sounds like problem in the *-schema's .normalize? hm :thinking:

forget that, nothing related ;d

ok, so the problem still exists, and we're not sure where it's happening?

Yea, absolutely.
Maybe the easy fix can be if we allow everything to be controlled through <!-- toc --> (if it isn't possible currently, i'm not sure), it would look like as it is CLI.
I was debugging few hours and didn't detect where the problem comes from. It may be in the verbose/verb-toc too.


Invalid (?) date format in JSON serialization

I'm playing with crystal and moment.js; when I serialize the date into a json, it returns this string:
{
  x: Time.now
}.to_json # => {"x": "2019-02-28T14:48:12+07:00:00"}

However, moment.js tell me the date format is invalid and should be RFC2822 compliant.
Basically, the seconds in the time zone stamp are not accepted. 2019-02-28T14:48:12+07:00 is accepted however.
I don't know if the time format outputted by crystal is RFC2822 compliant or not - if so, it could be a problem on moment.js library -; it seems any way overkill to have seconds in timezone, no?

@anykeyh => https://crystal-lang.org/api/master/Time.html#to_rfc2822(io%3AIO)-instance-method

All in all keep an eye over the API docs, they usually have the  answers :)

Thank you, I reformulate my issue then :smile:
Why date serialized to JSON are not by default RFC2822 or ISO compliant?

See https://crystal-lang.org/api/master/Time.html#to_json(json%3AJSON%3A%3ABuilder)-instance-method and https://github.com/crystal-lang/crystal/pull/5123#discussion_r193022243

Sure, but why are there seconds in the offset? Looking at RFC 3339 the offset is either +00:00 or Z. A +00:00:00 offset is invalid.

I think this is a mistake, might be a recent one. This wasn't always like that.

Yes, this was changed in #5123 and the new RFC_3339 formatter simply incorrectly outputs offset seconds which are not defined in RFC 3339 (they're however in ISO 8601).
RFC 2822 is an entirely different format.


Issues with handling of comments at the start of files

Hi there! I came across your project when looking for a yaml formatter to use in a project and I encountered some unexpected behaviour that might be useful to you.
The project I'm contributing to the yaml is parsed using Ruby, so there are tags in the yaml to help Ruby map yaml to classes. The problems below aren't caused by those tags, but they make small problems more painful than they'd be otherwise (problem 2 below in particular).
Problem 1 - inconsistent handling of comments in files containing multiple yaml documents
If a file contains multiple yaml documents starting with --- then the comments are reordered differently at the start of the file versus elsewhere. This seems to be due to the first --- of the file being prioritised as line 1 of the output.
This file has two documents with a consistent format:
# Set.new([1,2]).to_yaml - first
--- !ruby/object:Set
hash:
  1: true
  2: true

# Set.new([1,2]).to_yaml - second
--- !ruby/object:Set
hash:
  3: true
  4: true

(Adapted from https://rhnh.net/2011/01/31/yaml-tutorial/ - example shows yaml output from Ruby code)
The formatter introduces differences between the comment positions in the first and subsequent entries:
---
!ruby/object:Set
# Set.new([1,2]).to_yaml - first
hash:
  1: true
  2: true

# Set.new([1,2]).to_yaml - second
---
!ruby/object:Set
hash:
  3: true
  4: true

Problem 2 - tags being moved above comments at start of file
In the example above you can see that the first !ruby/object:Set tag is 'pulled' up to the start of the file, above the comment which was originally line 1. This can be an issue if the yaml file starts with a copyright notice (or any other comment that needs to be at the top of the file) because the tag is separated from the yaml and this obscures how the file works.
Original file:
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Set.new([1,2]).to_yaml - first
--- !ruby/object:Set
hash:
  1: true
  2: true

# Set.new([1,2]).to_yaml - second
--- !ruby/object:Set
hash:
  3: true
  4: true

A yamlfmt moves the tag away from the yaml:
---
!ruby/object:Set
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Set.new([1,2]).to_yaml - first
hash:
  1: true
  2: true

# Set.new([1,2]).to_yaml - second
---
!ruby/object:Set
hash:
  3: true
  4: true

Ideally (blocks of) comments at the start of a file would be given a special status and would still be the first lines of the file after formatting.

I appreciate you're a sole maintainer and the project is in v0.x.x at the moment, so I'm not expecting a fix in response! However I thought these examples and info about reproducing problems would be helpful to you.
Happy new year! 👋

And to add, for these examples my .yamlfmt file was:
formatter:
  type: basic
  indent: 2

and I played around with setting include_document_start and retain_line_breaks too but I don't think they affect the above examples.

Thank you for opening an issue @SarahFrench, and thank you for the in-depth detail!
I took a cursory look at this in the underlying yaml library. What I was able to determine is that what seems like an obviously consistent situation to the reader, namely the way these comments are placed around document-start tokens, is interpreted very differently by the underlying parser. Of the two problems, I suspect one is an unfortunate result of the YAML spec, but one problem may be a bug in the parser that I can potentially fix.
TLDR for the rest of these details: The issue with the comments at the head of the document may be reconcilable, but the one with comments on document starts further down the page may not. It all needs more research to be completely sure. Thank you for the issue and information, and I will keep this issue updated if I get anywhere!
Deeper technical stuff that is probably only interesting to my future self:
The YAML spec has 3 types of comment parsing patterns: HeadComment, LineComment, and FootComment. Each node in a yaml document can have any of all 3 of these.
What is happening under the hood in this scenario:
# Comment
---
a: 1

Is that the comment is being parsed as a HeadComment for the scalar value 1. This is the issue I think I may be able to fix. I have a strong suspicion that this comment really should be the head comment of the document start node and not the scalar value. I think this could be a parser bug.
The other annoying thing is this scenario of the following document:
a: 1

# Comment
---
a: 2

The comment in this scenario stays where it's supposed to after format. Unfortunately it's not  because it's the HeadComment of the document node like we want; it's because it's the FootComment of the above mapping node a.
I will need to dedicate some more time to this next week to see what of these behaviours are "up to spec" so to speak, and what of them are due to bad parsing.

input yaml:
repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
      # - id: terrascan

output yaml:
repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
        # - id: terrascan <-- two leading spaces

input yaml:
repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
      # - id: terrascan

output yaml:
repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: v1.77.2
    hooks:
      # - id: infracost_breakdown
      - id: terraform_fmt
      # - id: terraform_providers_lock
      - id: terraform_validate
        # - id: terrascan <-- two leading spaces

Hi @djgoku, I think what you have there is unrelated to this issue. Would you mind opening a new one?


Hotfix/byu request swift

This change is

Reviewed 11 of 11 files at r1.
Review status: all files reviewed at latest revision, 38 unresolved discussions.

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 16 at r1 (raw file):

    static func getComputerLabs(completionHandler: @escaping ([ComputerLab]?, ByuError2?) -> Void) {
        guard let url = url(base: BASE_URL) else {

Add super.

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 21 at r1 (raw file):

        }

        let request = ByuRequest2(requestMethod: .GET, url: url, authMethod: .NO_AUTH)

Can we make GET the default requestMethod?

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 24 at r1 (raw file):

        request.startAsynchronous { (response) in
            if response.failed {
                completionHandler(nil, response.error)

Talk to me about this one... I want to think about error handling differently in the future

byuSuite/Classes/byuSuite-Bridging-Header.h, line 6 at r1 (raw file):

#import "ByuCredentialManager.h"
#import "BYUNetworkActivityIndicator.h"

Why did we add these again? Are these all still in obj-c?

byuSuite/Classes/ByuRequest-Swift/ByuError2.swift, line 12 at r1 (raw file):

import UIKit

struct ByuError2: CustomStringConvertible {

Didn't we decide that we were going to use class unless there is a specific benefit we get from structs? Or have you found a benefit to make it worth it?

byuSuite/Classes/ByuRequest-Swift/ByuError2.swift, line 17 at r1 (raw file):

    var readableMessage: String
    var debugMessage: String?
    var description: String {

So what is this syntax doing? Is this overriding the get function?

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 16 at r1 (raw file):

    //MARK: - Types

    enum RequestMethod: String {

Comment about how putting the "String" here will make the enum automatically serialize to the string equivalent

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 45 at r1 (raw file):

    private var useSandboxToken: Bool
    private var authMethod: AuthMethod {
        didSet {

So if I understand, this changes the functionality a bit... This will generate the token when they set the auth method, rather than when the request is going to be made. Not sure that this is a problem, but talk to me about what this is actually doing

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 49 at r1 (raw file):

            switch authMethod {
            case .NONCE: authHeaderValue = ByuCredentialManager.nonceHeader()

Would it be better to make this a public var with a getter rather than a method? Talk to me about this one

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 64 at r1 (raw file):

    var description: String {
        return "\(String(describing: request.url)) \(String(describing: request.httpMethod))\n\(String(describing: request.allHTTPHeaderFields))"

What is the describing stuff?

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 69 at r1 (raw file):

    //MARK: - Object life cycle

    init(requestMethod: RequestMethod, url: URL, authMethod: AuthMethod = .OAUTH, acceptType: MimeType? = .JSON, contentType: MimeType? = nil, body: Data? = nil, retryCount: Int = 1, pathToReadableError: String? = nil, useSandboxToken: Bool = false) {

Default to GET?

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 69 at r1 (raw file):

    //MARK: - Object life cycle

    init(requestMethod: RequestMethod, url: URL, authMethod: AuthMethod = .OAUTH, acceptType: MimeType? = .JSON, contentType: MimeType? = nil, body: Data? = nil, retryCount: Int = 1, pathToReadableError: String? = nil, useSandboxToken: Bool = false) {

pathToReadableError could be defaulted to "". If that makes anything else easier. It doesn't need to be optional

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 70 at r1 (raw file):

    init(requestMethod: RequestMethod, url: URL, authMethod: AuthMethod = .OAUTH, acceptType: MimeType? = .JSON, contentType: MimeType? = nil, body: Data? = nil, retryCount: Int = 1, pathToReadableError: String? = nil, useSandboxToken: Bool = false) {
        request = URLRequest(url: url)

Is this a self.request? Or is this a different request? If it's the instance variable, let's use self. on these

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 71 at r1 (raw file):

    init(requestMethod: RequestMethod, url: URL, authMethod: AuthMethod = .OAUTH, acceptType: MimeType? = .JSON, contentType: MimeType? = nil, body: Data? = nil, retryCount: Int = 1, pathToReadableError: String? = nil, useSandboxToken: Bool = false) {
        request = URLRequest(url: url)
        request.httpMethod = requestMethod.rawValue

What is rawValue? Is that how you get the string out of it? If so, no need to put a comment above like I told you to. Just put a comment here instead

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 96 at r1 (raw file):

        */

        //TODO: see if this check is necessary. addValue(_:forHTTPHeaderField:) automatically appends value to any existing values with a comma delimiter

This only purpose for this check is to allow a user to define their own headers that won't get overridden. So you can test it and see the use cases

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 110 at r1 (raw file):

        BYUNetworkActivityIndicator.incrementActivityCount()
        URLSession.shared.dataTask(with: request) { (data, response, error) in
            BYUNetworkActivityIndicator.decrementActivityCount()

If this class is still in objective c, go ahead an port it over. It should be REALLY easy, and nobody uses it except for this class (if I remember correctly)

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 126 at r1 (raw file):

                        return
                    } else {
                        print("Error: \(String(describing: byuResponse.error))")

Do you always have to do this? I thought the "description" field on the object made it so you didn't have to do this...

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 144 at r1 (raw file):

        var response: URLResponse?
        let data = try? NSURLConnection.sendSynchronousRequest(request, returning: &response)

What does try? do? Does it just assume that if you throw an error, data will be set to nil?

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 152 at r1 (raw file):

    private func didObtainAuthorization() -> ByuError2? {
        if authMethod != .NO_AUTH && request.value(forHTTPHeaderField: "Authorization") == nil {

Let's save "Authorization" as a private static final now that we've used it a couple times

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 19 at r1 (raw file):

    var response: HTTPURLResponse?
    var error: ByuError2?
    var failed: Bool {

Is this syntax automatically creating a getter?

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 20 at r1 (raw file):

    var error: ByuError2?
    var failed: Bool {
        let isError = error != nil

Could you use the ?? notation here?
return error != nil && !response?.isSuccessful() ?? false

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 38 at r1 (raw file):

        self.response = response

        if failed {

For confusion's safe, could we say self.failed. I still find myself look around for a boolean var failed...

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 42 at r1 (raw file):

                self.error = ByuError2(error: error, readableMessage: readableMessage)
            } else {
                self.error = ByuError2(error: error, readableMessage: "The server encountered an error. Please try again later.", debugMessage: getDataString())

Could you save this as a private static let DEFAULT_MESSAGE? I don't know why it wasn't already...

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 65 at r1 (raw file):

    }

    func getDataXml() -> [AnyHashable: Any]? {

Why is the return value of this different from the getDataJson()?

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 66 at r1 (raw file):

    func getDataXml() -> [AnyHashable: Any]? {
        return try? XMLReader.dictionary(forXMLData: data)

Why don't you use the guard let data statement here (like you did in the getDataJson)?

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 74 at r1 (raw file):

    private func string(_ pathToReadableError: String?) -> String? {
        guard let path = pathToReadableError,

Add the comment back in (or as many of them as still seem helpful)

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 93 at r1 (raw file):

    func isSuccessful() -> Bool {
        //statusCode >= 200 && statusCode < 300
        return 200...299 ~= statusCode //~= is a pattern-matching operator

Haha- you'll definitely have to explain this one to me. Are we relying on the fact that a negative number would be cast to a false and a positive number would be cast to a true?

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 96 at r1 (raw file):

    }

    func statusMessage() -> String {

You can remove this one. It's no longer used. Also, if this extension only has one function with one line which is called one time, would there be any reason not to move it into the ByuResponse2 class instead?

byuSuite/Classes/Reusable/KeyPath.swift, line 10 at r1 (raw file):

//

struct KeyPath {

class?

byuSuite/Classes/Reusable/KeyPath.swift, line 32 at r1 (raw file):

/*
 ExpressibleByStringLiteral enables a type to be initialized with a string literal.

When you say a "string literal" do you mean doing this:
KeyPath("value")

?

byuSuite/Classes/Reusable/KeyPath.swift, line 37 at r1 (raw file):

extension KeyPath: ExpressibleByStringLiteral {
    init(stringLiteral value: String) {
        self.init(value)

Why do these call the self.init? Wouldn't that be an infinite loop? Shouldn't it be super.init?

byuSuite/Classes/Reusable/KeyPath.swift, line 49 at r1 (raw file):

}

extension Dictionary where Key == String {

Huh? So you're only extending dictionaries with String keys? Like [String: Any]?

byuSuite/Classes/Reusable/KeyPath.swift, line 50 at r1 (raw file):

extension Dictionary where Key == String {
    subscript(keyPath keyPathString: String) -> Value? {

subscript? Are you overriding a function here? Is this what would be called when using:
let dict = [String: Any]
print(dict["value"])

byuSuite/Classes/Reusable/KeyPath.swift, line 56 at r1 (raw file):

        if remainingKeyPath.isEmpty {
            //The key path has only one segment, use standard dictionary subscript
            return self[key]

So this won't make a recursive call?

byuSuite/Classes/Reusable/KeyPath.swift, line 57 at r1 (raw file):

            //The key path has only one segment, use standard dictionary subscript
            return self[key]
        } else if let nestedDict = self[key] as? [Key: Any] {

Where is Key defined? Is that using the Key == String from the top of the extension?

byuSuite/Classes/Reusable/Clients/ByuClient2.swift, line 13 at r1 (raw file):

class ByuClient2 {
    static func url(base: String, pathParams: [String]? = nil, queryParams: [String: String]? = nil) -> URL? {
        var urlString = base + "/"

I don't think this is what the original functionality was. I think the objective-c code only added the "/" if there was at least one pathParam... Does that seem right to you?

byuSuite/Classes/Reusable/Clients/ByuClient2.swift, line 22 at r1 (raw file):

        if let queryParameters = queryParams,
            queryParameters.count > 0 {
            urlString += "&\(queryParameters.map({ "\($0.key)=\($0.value.byUrlEncoding())" }).joined(separator: "&"))"

Was this first character supposed to be a "?"

byuSuite/Classes/Reusable/UI/ByuViewController2.swift, line 11 at r1 (raw file):

import UIKit

class ByuViewController2: UIViewController {

It looks like this is missing a bunch of functionality... Was that on purpose?

Comments from Reviewable

Review status: 4 of 13 files reviewed at latest revision, 38 unresolved discussions.

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 16 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Add super.

Done.

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 21 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Can we make GET the default requestMethod?

Done.

byuSuite/Apps/LabComputers/model/LabComputersClient.swift, line 24 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Talk to me about this one... I want to think about error handling differently in the future

Done.

byuSuite/Classes/byuSuite-Bridging-Header.h, line 6 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Why did we add these again? Are these all still in obj-c?

Yep

byuSuite/Classes/ByuRequest-Swift/ByuError2.swift, line 12 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Didn't we decide that we were going to use class unless there is a specific benefit we get from structs? Or have you found a benefit to make it worth it?

Done.

byuSuite/Classes/ByuRequest-Swift/ByuError2.swift, line 17 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
So what is this syntax doing? Is this overriding the get function?

Yes. This is the shorthand for a read-only computed property. It's the same as doing     var description: String {         get {             return ...         }     }

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 16 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Comment about how putting the "String" here will make the enum automatically serialize to the string equivalent

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 45 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
So if I understand, this changes the functionality a bit... This will generate the token when they set the auth method, rather than when the request is going to be made. Not sure that this is a problem, but talk to me about what this is actually doing

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 49 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Would it be better to make this a public var with a getter rather than a method? Talk to me about this one

Made a TODO in ByuCredentialManager

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 64 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
What is the describing stuff?

Xcode uses it to fix warnings when trying to print an optional. You can either provide a default value or use String(describing:) which will print nil for you if the thing you're trying to print is nil

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 69 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Default to GET?

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 69 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
pathToReadableError could be defaulted to "". If that makes anything else easier. It doesn't need to be optional

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 70 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Is this a self.request? Or is this a different request? If it's the instance variable, let's use self. on these

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 71 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
What is rawValue? Is that how you get the string out of it? If so, no need to put a comment above like I told you to. Just put a comment here instead

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 110 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
If this class is still in objective c, go ahead an port it over. It should be REALLY easy, and nobody uses it except for this class (if I remember correctly)

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 126 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Do you always have to do this? I thought the "description" field on the object made it so you didn't have to do this...

An object's description property is optional and this his how Xcode handles printing optionals now unfortunately

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 144 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
What does try? do? Does it just assume that if you throw an error, data will be set to nil?

Correct

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 152 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Let's save "Authorization" as a private static final now that we've used it a couple times

Done.

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 19 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Is this syntax automatically creating a getter?

Yes. See comment above somewhere

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 20 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Could you use the ?? notation here?
return error != nil && !response?.isSuccessful() ?? false

Unfortunately you can't. I tried something like that, but I get an error saying that wants me to force unwrap the Bool? being returned from response. isSuccessful() returns a Bool but with the optional chaining it becomes optional

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 38 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
For confusion's safe, could we say self.failed. I still find myself look around for a boolean var failed...

Yeah I can. You can always command click to find where it is. I have been leaving it off since it's a general Swifty thing to do

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 42 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Could you save this as a private static let DEFAULT_MESSAGE? I don't know why it wasn't already...

Done.

Comments from Reviewable

Reviewed 9 of 9 files at r2.
Review status: all files reviewed at latest revision, 19 unresolved discussions.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 64 at r1 (raw file):
Previously, nateyj (Nathan Johnson) wrote…
Xcode uses it to fix warnings when trying to print an optional. You can either provide a default value or use String(describing:) which will print nil for you if the thing you're trying to print is nil

Gotcha. So you get a warning when you don't use it?

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 126 at r1 (raw file):
Previously, nateyj (Nathan Johnson) wrote…
An object's description property is optional and this his how Xcode handles printing optionals now unfortunately

Grrr... At least we don't use print statements all that often in our code...

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 20 at r1 (raw file):
Previously, nateyj (Nathan Johnson) wrote…
Unfortunately you can't. I tried something like that, but I get an error saying that wants me to force unwrap the Bool? being returned from response. isSuccessful() returns a Bool but with the optional chaining it becomes optional

And there's no way to do an if let x = ... || y = ...?

Comments from Reviewable

Review status: all files reviewed at latest revision, 19 unresolved discussions.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 64 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Gotcha. So you get a warning when you don't use it?

Correct

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 96 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
This only purpose for this check is to allow a user to define their own headers that won't get overridden. So you can test it and see the use cases

Done.

byuSuite/Classes/ByuRequest-Swift/ByuRequest2.swift, line 126 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Grrr... At least we don't use print statements all that often in our code...

I know. This warning started appearing with the latest Xcode update. Lame

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 20 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
And there's no way to do an if let x = ... || y = ...?

Unfortunately, you cannot do an if let combined with an OR statement

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 65 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Why is the return value of this different from the getDataJson()?

We decided to cast both to [String: Any] and return [String: Any]?

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 66 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Why don't you use the guard let data statement here (like you did in the getDataJson)?

Because XMLReader.dictionary(forXMLData:) takes Data? whereas JSONSerialization.jsonObject(with:options:) takes a non-optional Data

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 74 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Add the comment back in (or as many of them as still seem helpful)

Done.

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 93 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Haha- you'll definitely have to explain this one to me. Are we relying on the fact that a negative number would be cast to a false and a positive number would be cast to a true?

Done.

byuSuite/Classes/ByuRequest-Swift/ByuResponse2.swift, line 96 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
You can remove this one. It's no longer used. Also, if this extension only has one function with one line which is called one time, would there be any reason not to move it into the ByuResponse2 class instead?

Nope. Inlined it

byuSuite/Classes/Reusable/KeyPath.swift, line 10 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
class?

Done.

byuSuite/Classes/Reusable/KeyPath.swift, line 32 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
When you say a "string literal" do you mean doing this:
KeyPath("value")

?

Exactly. You'd use it like this dictionary[keyPath: "results.some.key"] with "results.some.key" being initialized as a KeyPath

byuSuite/Classes/Reusable/KeyPath.swift, line 37 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Why do these call the self.init? Wouldn't that be an infinite loop? Shouldn't it be super.init?

Nope. super.init throws an error saying that "super members cannot be referenced from a root class" since the class is final. self.init refers to init(_ string:). If you command click it goes to the custom init

byuSuite/Classes/Reusable/KeyPath.swift, line 49 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Huh? So you're only extending dictionaries with String keys? Like [String: Any]?

Yep because a key path only works when the keys are strings

byuSuite/Classes/Reusable/KeyPath.swift, line 50 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
subscript? Are you overriding a function here? Is this what would be called when using:
let dict = [String: Any]
print(dict["value"])

I'm not overriding the standard dictionary subscript but creating a custom one. That's why it's in an extension since it extends the functionality of a Dictionary, not overrides it like in inheritance

byuSuite/Classes/Reusable/KeyPath.swift, line 56 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
So this won't make a recursive call?

Nope. There's no need to since it has found the value it's looking for

byuSuite/Classes/Reusable/KeyPath.swift, line 57 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Where is Key defined? Is that using the Key == String from the top of the extension?

In the guard let

byuSuite/Classes/Reusable/Clients/ByuClient2.swift, line 13 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
I don't think this is what the original functionality was. I think the objective-c code only added the "/" if there was at least one pathParam... Does that seem right to you?

Ah you're right. good catch

byuSuite/Classes/Reusable/Clients/ByuClient2.swift, line 22 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Was this first character supposed to be a "?"

Another good catch. Yes it is

byuSuite/Classes/Reusable/UI/ByuViewController2.swift, line 11 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
It looks like this is missing a bunch of functionality... Was that on purpose?

Yes. I just wanted to see if I could get showError(_:title:alertHandler:) working with the Swift error stuff

Comments from Reviewable

Reviewed 4 of 4 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

byuSuite/Classes/Reusable/KeyPath.swift, line 57 at r1 (raw file):
Previously, nateyj (Nathan Johnson) wrote…
In the guard let

I meant the capital Key

Comments from Reviewable


Make camera system initiate playspace parenting

The camera system was previously not initiating the parenting of the camera to the playspace. This was being performed by most other services when they added a child object to the playspace transform.
Since MRTK expects the camera to be parented to support features such as teleportation, the camera system should ensure proper hierarchy at runtime.
Since the XR SDKs underlying our mixed reality support assume control over the camera's local position and not all platforms enforce the initial camera position be the origin (ex: Windows Mixed Reality uses the origin while OpenVR looks to be honoring the value set in the inspector).
This change adds a log warning that informs developers when the camera is not set to the origin at initialization of the camera system.

/azp run mrtk_pr

/azp run mrtk_pr


Still active?

Could you confirm if the repo is still active and needed? To do so, just close this issue by end of Feb 2024. If not, we'll archive the repo. The repo can still be unarchived, so it's not a destructive action.

no longer needed.


Change channel.pyx to channel.py

Original report by Galen O'Neil (Bitbucket: oneilg, GitHub: oneilg).

We should do this. We should just move the cython functions into their own file like we were doing before. It was a worthwhile experiment, but between truncated tracebacks and incomplete information when using help, I think we've determined the result of the experiment. Python code works better in .py files.

Original comment by Young Il Joe (Bitbucket: jojo978, GitHub: jojo978).

I think it's a design choice. I'm not sure about other people. But, subclassing doesn't me make me understand harder. If it does I can change that.
I didn't want to increase call stack by simply wrapping another cython function.

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).

Yes, I think this is going to be a useful compromise.
However, I do not understand why you want to extend the class by subclassing in Cython. Would it not be simpler for the Mass team to understand if you just made the class stay in pure Python, and let it call certain functions as needed that live in Cython? Here analysis_algorithms.pyx would be the model.

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).

I agree with Galen. This was surprisingly easy to try, but I think it made Mass harder to use. Why? Because:

Tracebacks now point into C code with 5-digit line numbers. You can track down those lines, but they tell you little.
Tracebacks cannot work with the Python interactive debugger pdb and let you explore what went wrong.
Help on methods inside the Cython class does not contain the argument list, but just says methodname(...).
It takes 30 seconds to build and install instead of 3.
It increases the mental obstacles to working on the contents of channel.pyx, which is the most important and largest file in Mass.
There is no speed improvement that anyone will notice in 95% of the code living in channel.pyx. Better just to Cythonize the functions as needed.

Original comment by Young Il Joe (Bitbucket: jojo978, GitHub: jojo978).

I started a cython_derived_channel branch. mass.core.cython_channel.CythonMicrocalDataSet will extend a pure mass.core.channel.MicrocalDataset and override summarize_data and filter_data with cython methods.
I think this will help.

Original comment by Young Il Joe (Bitbucket: jojo978, GitHub: jojo978).

I tried to generally follow OOP patterns. But, if we don't need to hide the detail of summarize_data and filter_data implementations in MicrocalDataset, it make sense to put the actual algorithm outside the class.

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).

This appears to be complete.

Original comment by Young Il Joe (Bitbucket: jojo978, GitHub: jojo978).

Probably, I did that way because I didn't see a immediate need for the reusability of the Cuts class. I also think it would be better if we can extract features (that are MicrocalDataSet-independent) from the current Cut class and make MicrocalDataset have a inner class (or something like that) that extends the neutral Cut class.

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).

Making the MicrocalDataSet smaller and easier to handle seems like a good idea.
But doesn't this conflict with what you have done with cuts? Cuts now appear to be very tightly integrated into the MicrocalDataSet class. Perhaps that is another thing that should be better separated.

Original comment by Young Il Joe (Bitbucket: jojo978, GitHub: jojo978).

I think it also make sense to reduce the size of MicrocalDataset (just to make it easier to handle). If plotting methods use only public members of MicrocalDataset, you can create a separate class.
Also if want to delegate plotting functionality in MicrocalDataset, it can make MicrocalDataset extend the separate plotting class.


Android API < 26 runtime error

There is a runtime error due to java.nio.file has been added to Android since API 26
https://developer.android.com/reference/java/nio/file/package-summary.html
Java7Support: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added

I'm not sure but I think it could be the use of Jackson in Binance module

Are we still supporting android @walec51


feat: seperate connectionParams from headers options for web socket

I needed to set connectionParams without "headers" filed.
So I added "connectionParams" configuration.

Thanks for your contribution @Dennis-Emmental . I'm happy to merge it, if you could remove the existing headers property that is there.
Thanks!

Do you want to remove "headers" property?
I think "headers" property is need for HTTP header. And "connectionParams" is need for only web socket.

Hey @Dennis-Emmental - sorry for the delay on getting this merged.
I tweaked it a little bit so that both connectionParams and headers work as expected. I hope that works for you.
Thanks again for the contribution!

:tada: This issue has been resolved in version 1.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


License file should be updated

NEw license header should be added 2014-2015 see Content bundle.

It's already up to date.


Fix IsDense.

Add tests.

What does this do? Does it fix an existing issue?

@hcho3 Yes, I'm doing the dmatrix callback, it's a bug encountered by @wbo4958 .  This fixed the order of DeviceDMatrix initialization steps where calculating num_nonzero_ must precede calling IsDense.  I also added a test.

Thanks for clarification.

Codecov Report

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

@@           Coverage Diff           @@
##           master    #5702   +/-   ##
=======================================
  Coverage   82.17%   82.17%
=======================================
  Files          12       12
  Lines        2732     2732
=======================================
  Hits         2245     2245
  Misses        487      487

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 e35ad8a...1ebee48. Read the comment docs.


[Android 13] New transition when opening new activities

Use case
Flutter apps running on Android 13 or higher don't use the new transition when starting a new activity.
Proposal
Extend the PageTransitionsBuilder class to define a default page transition that's similar to the one provided by Android T
https://github.com/user-attachments/assets/b3c5ba21-3c7b-43d2-a5cd-e0e084399d4e
Note: Even if the app doesn't use Material 3, the new page transition should be used when the app runs on Android 13 or higher.

@songyan-microprogram
https://github.com/flutter/flutter/issues/110664 was a similar issue raised which was closed in favor of https://github.com/flutter/flutter/issues/116526. I see that you have commented in the duplicate issue. Does the original issue address your case ? Because PageTransitionBuilder comes from material 3 which is mentioned in the original issue. If that isn't same case as yours, can you elaborate how your case is different from it ?

@darshankawar,
I don't think #110664 is a duplicate of #116526.

#110664 ensures that apps running on Android 13 or higher use the new transition when pushing or popping a route.
#116526 focuses solely on the Material Design version and does not address the Android version.

Thanks for the update and feedback. I will keep this issue open and label for team's tracking.
/cc @reidbaker for thoughts.


Add example of Mermaid in the tutorial

closes #804
cc: @jph00

Local preview

Lovely! We don't need to install graphviz or anything for this to render?

No it's coming for free


Constant idle CPU usage on VCs containing a google map

Hi there, I'm using the Swift version of this clustering SDK within my application (latest google-maps-ios-utils version, GoogleMaps 2.7.0, Swift 4.1, Xcode 9.4 beta). My issue is that google maps doesn't seem to allow the CPU to actually idle when there's no screen interaction.
Via Xcode Instruments' CPU Profiler, numerous symbols are shown to keep firing in the background. I've attached a few screenshots of the issue below (which profiles a VC after the google map has loaded in (with no screen interaction).

As you can see, google map components are firing off for the majority of that profiling timespan, even though the view isn't being manipulated at all.
Our setup is as follows:
gmap.settings.setAllGesturesEnabled(false)
var bounds = GMSCoordinateBounds()
let iconGenerator = GMUDefaultClusterIconGenerator()
let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm()
renderer = GMUDefaultClusterRenderer(mapView: gmap,
                                     clusterIconGenerator: iconGenerator)
clusterManager = GMUClusterManager(map: gmap, algorithm: algorithm,
                                   renderer: renderer)
renderer.delegate = self

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(mapTapped))
mapView.addGestureRecognizer(tapGesture)
let item =
    ClusterItem(position: CLLocationCoordinate2DMake(self.cityLocations[0].latitude, self.cityLocations[0].longitude), name: self.cityLocations[0].name, type: "Location", imgString: locationPhotos[0].url)
clusterManager.add(item)
self.clusterItems.append(item)
clusterManager.cluster()
for item in clusterItems {
    bounds = bounds.includingCoordinate(item.position)
}
clusterManager.cluster()

DispatchQueue.main.asyncAfter(deadline: (.now() + 0.1)) {
    gmap.frame = CGRect(x: self.mapView.bounds.origin.x , y: self.mapView.bounds.origin.y-2, width: self.mapView.bounds.size.width, height: self.mapView.bounds.size.height+4)
    if self.cityLocations.count == 1 {
        gmap.camera = GMSCameraPosition.camera(withLatitude: self.cityLocations[0].latitude, longitude: self.cityLocations[0].longitude, zoom: 10.0)
    } else {
        gmap.moveCamera(GMSCameraUpdate.fit(bounds, with: UIEdgeInsetsMake(50.0 ,50.0 ,50.0 ,50.0)))
    }
    self.mapView.addSubview(gmap)
}

func renderer(_ renderer: GMUClusterRenderer, willRenderMarker marker: GMSMarker) {
    if marker.userData is GMUCluster {
    } else {
        if let data = marker.userData as? ClusterItem {
            marker.icon = markerIcon(type: data.type)
            marker.title = data.name
        }
    }
}

Things I've tried:

On willRenderMarker, setting the marker's iconView property to nil
On willRenderMarker, setting the marker's tracksViewChanges property to false
Removing all google maps code (which resulted in the CPU being able to idle properly)

Any help would be greatly appreciated.

Please raise an issue on the Google Maps SDK for iOS Issue Tracker. This is the issue tracker for the open sourced utility library, not Google Maps SDK for iOS itself.
Thanks!


fix error: can't modify frozen String

https://github.com/fastlane/fastlane/issues/16055
Checklist

[ ] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[ ] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[ ] I've updated the documentation if necessary.

@googlebot I signed it!


Model selection

Describe the feature you'd like to see:
I would like to be able to select any model I have installed in my local stable diffusion
Additional information
No response

This is a duplicate of #25. I will try to make this happen soon!


PPO2: act_model and train_model[question]

This is a question on the implementation of PPO2 in stable baselines. I notice that there are two models: the act model and the train model. Am I correct that they share the same weights, and the only difference is the input dimensional? If that is the case, what's the difference between
vpred = train_model.value_flat and  self.old_vpred_ph , which is fed the act_model.value_flat during training?
I am also a bit confused on the lines
  vpred_clipped = self.old_vpred_ph + \                         tf.clip_by_value(train_model.value_flat - self.old_vpred_ph,                                              - self.clip_range_vf_ph, self.clip_range_vf_ph)
Why doing this and why it depends on reward scaling?
Thanks in advance!

Similar to how policy is updated by clipping the fraction between current and old (one that gathered samples) policy, this code here does the same for values (i.e. avoid too large changes from old policy). self.old_vpred_ph includes these original predictions, and the new ones after updates should not deviate too much from them. vpred_clipped is this clip value.
This feature was not explained in the PPO paper, but is present in the baselines implementation.

i guess where i got confused is (1) are train model and act model the same? (2) if not, where in the code do we sync act model to the train model?

Ah yes. I agree this part is confusing and I do not fully understand it myself, but indeed the variables seem to be shared and only difference is the number of outputs. All the "values during acting" are stored (and frozen) in the placeholders. The naming here is bit confusing.
@araffin Do you have insight on what is the purpose of these, exactly? For training LSTMs?

It just does not make sense if act model and train model are the same...act model is the old policy, while train model is the new one, and the clipping in objective function is to make sure that they do not differ too much.

(1) are train model and act model the same?

yes. act_model has nothing to do with training, it is only used at predict time.
The question was already answered in https://github.com/hill-a/stable-baselines/issues/222 and https://github.com/hill-a/stable-baselines/issues/314
And @Miffyli is right, we have two because of tensorflow not handling properly different input shapes for recurrent policies.

vpred_clipped

This is an un-documented trick from the Baselines code. It enforces that value prediction is not too far from the old one, but it depends on the reward magnitude (see #216 )
There is a paper about the different code-level optimizations and their effects here: https://openreview.net/forum?id=r1etN1rtPB

clipping in objective function is to make sure that they do not differ too much.

The clipping is done differently, you don't need to copy the weights, you just need to keep track of the old log probabilities:
https://github.com/hill-a/stable-baselines/blob/c4c31cb5687800cf102054f0935aa09e7545159f/stable_baselines/ppo2/ppo2.py#L142
"old negative log prob actions" (yes, quite ugly name... legacy code...)
I recommend you to read the v3 version ;) (much cleaner)
https://github.com/DLR-RM/stable-baselines3/blob/master/stable_baselines3/ppo/ppo.py#L198
the same tricks (objective and value clipping) are implemented by in pytorch.

@araffin Thanks for your reply.
(1) It seems that self.old_neglog_pac_ph will be fed the values of negative log prob actions computed using the act model (i.e. self.model.step in the function runner.run()). On the other hand, the new value neglogpac = train_model.proba_distribution.neglogp(self.action_ph) is the exact same value computed using train model. If these two models are the same, then why are these two values different (so that the ratio  ratio = tf.exp(self.old_neglog_pac_ph - neglogpac) is not always 1)?
(2) From the line vpred_clipped = self.old_vpred_ph + tf.clip_by_value(train_model.value_flat - self.old_vpred_ph, - self.clip_range_vf_ph, self.clip_range_vf_ph) , we again see that self.old_vpred_ph which is the value function of act model, and train_model.value_flat are different. Wouldn't that imply that

value function of act model = $V_{\theta_{t-1}}$
value function of train model = $V_{\theta_t}$ ?

i.e. train model uses the updated weights while act model uses the weight 1 step before?

the ratio = tf.exp(self.old_neglog_pac_ph - neglogpac) will be one at the first iteration, but afterward, the values fed into old_neglog_pac_ph are the same (we don't use the act model to compute them again, otherwise, the ratio will be always one).
the answer for the 2nd question is the same: we use act_model (same as train_model) only before the first epoch to compute those values, that stay the same during the rest of the optimization steps (we don't re-compute them).
again, I really recommend you to read v3 code, the logic is exactly the same, but in pytorch (so closer to python), because I think the problem here is more because of tensorflow logic that is harder to read.

Understood, will definitely take a look. Thanks a lot !

Hello, I have an additional question. I saw n_step = 1 in act_model and n_step=64 or 128 in train_model. The n_step means how many steps of data are taken as time-series data for LSTM.   But it seems that there is a fully connected layer after lstm layer for action distribution generation. How could these two models with different n_steps(also I mean different dimensions for fully connect layer and different numbers of weights) share parameters?
Thank you very much.

@Kailiangdong
LSTM removes the sequence-dimension, essentially turning the 64/128 n_step sequence into output of same size as with 1 n_step, so the same fully connected network works in both cases.


Broken "master" template download

Describe the bug
Download and import of "master" per https://rakugodocs.readthedocs.io/en/latest/topics/project_setup/#create-rakugo-project results in a non-functioning copy of "The Question" and not a blank template project shell.
To Reproduce
Download the template
Import it.
Expected behavior
A blank ready to go project.
Runtime (please complete the following information):

Godot version: 3.2.4rc3
Rakugo Version: 3.1.1

Getting: Invalid get index 'res://game/scenes/start.tscn' (on base: 'Dictionary').

missing scene start.tscn in scenelinks.

Sorry about this I will soon fix this @michael-conrad @Carpynch0

@michael-conrad @Carpynch0 Fixed just redownload.


Add JustList: {Community Inu Token}

Checklist

[x] I understand that this is not the place to request a token listing.
[x] I have tested that my JustList is compatible by pasting the URL into the add a list UI at justswap.org.
[x] I understand that filing an issue or adding liquidity does not guarantee addition to the justlists website.

Please provide the following information for your token.
JustList URL must be HTTPS.
JustList URL: https://communityinu.org/jason/
JustList Name: Community Inu Token
Link to the official homepage of the JustList manager: https://communityinu.org/

Dear Jeffwami
Now i upload all these details which are required from your side , i want to add my Community token at Sun Swap kindly approve my request and guide me the further detail
Regards

Sorry, your issue will be closed as you did not submit your information in the correct format.

What is the right way to submit any information ?? Can you explain it
I already attempt many times now i give you jason file and all the stuff which you required but your issue is same.
Can you plz guide me that what is the right way to submit my information ???