HUDI-1392 lose partition info when using spark parameter basePath

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contributing.html before opening a pull request.

What is the purpose of the pull request
(For example: This pull request adds quick-start document.)
Brief change log
(for example:)

Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end.
Added HoodieClientWriteTest to verify the change.
Manually verified the change by running a job locally.

Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Codecov Report

Merging #2243 (32def27) into master (971f028) will decrease coverage by 43.15%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #2243       +/-   ##
=============================================
- Coverage     53.56%   10.41%   -43.16%
+ Complexity     2771       48     -2723
=============================================
  Files           348       50      -298
  Lines         16100     1777    -14323
  Branches       1639      211     -1428
=============================================
- Hits           8624      185     -8439
+ Misses         6778     1579     -5199
+ Partials        698       13      -685

Flag
Coverage Δ
Complexity Δ

hudicli
?
?

hudiclient
?
?

hudicommon
?
?

hudihadoopmr
?
?

hudispark
?
?

huditimelineservice
?
?

hudiutilities
10.41% <ø> (-59.66%)
0.00 <ø> (ø)

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

Impacted Files
Coverage Δ
Complexity Δ

...va/org/apache/hudi/utilities/IdentitySplitter.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-2.00%)

...va/org/apache/hudi/utilities/schema/SchemaSet.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-3.00%)

...a/org/apache/hudi/utilities/sources/RowSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-4.00%)

.../org/apache/hudi/utilities/sources/AvroSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-1.00%)

.../org/apache/hudi/utilities/sources/JsonSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-1.00%)

...rg/apache/hudi/utilities/sources/CsvDFSSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-10.00%)

...g/apache/hudi/utilities/sources/JsonDFSSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-4.00%)

...apache/hudi/utilities/sources/JsonKafkaSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-6.00%)

...pache/hudi/utilities/sources/ParquetDFSSource.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-5.00%)

...lities/schema/SchemaProviderWithPostProcessor.java
0.00% <0.00%> (-100.00%)
0.00% <0.00%> (-3.00%)

... and 323 more

hi, garyli1019
thanks for your review

"getting a basepath instead of basePath in the map"
the map is a CaseInsensitiveMap (https://github.com/apache/spark/blob/v2.4.4/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/CaseInsensitiveMap.scala) it store lowercase key . it will return correct value when call its get method
"the user defined query type will be replaced by the DEFAULT_QUERY_TYPE_OPT_VAL"
i missed the logic . and i changed it in translateViewTypesToQueryTypes method

Hi @yui2010 , sorry I am not quite sure if I understand correctly.
So the problem here is Spark with version lower than 2.4.7 will use Map.get("basePath") but the actual key in the Map has been converted to "basepath". Therefore we need to somehow force Spark to use CaseInsensitiveMap.get("basePath"), and then we will get the correct result. Is that correct?
If so, how can we do that on the Hudi side?

hi, garyli1019
i try to describe it clearly

set hoodie.datasource.write.hive_style_partitioning->true
        spark.read().format("org.apache.hudi").option("mergeSchema", true).option("basePath",tablePath).load(tablePath + (nonPartitionedTable ? "/" : "/")).createOrReplaceTempView(hudiTable);
        spark.sql("select * from hudiTable where date>'20200807'").explain();
step 1. spark  read datasource  (https://github.com/apache/spark/blob/v2.4.4/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala L 317)
      case (dataSource: RelationProvider, None) => dataSource.createRelation(sparkSession.sqlContext, caseInsensitiveOptions)  //**caseInsensitiveOptions CaseInsensitiveMap type**

step 2. hudi  create relation
org.apache.hudi.DefaultSource#createRelation(sqlContext: SQLContext,optParams: Map[String, String],schema: StructType): BaseRelation = {
     // the type optParams is CaseInsensitiveMap. and **parameters type will be converted to Map thought Map ++**
     val parameters = Map(QUERY_TYPE_OPT_KEY -> DEFAULT_QUERY_TYPE_OPT_VAL) ++ translateViewTypesToQueryTypes(optParams)

step 3. hudi  transform to parquet relation if we query table(cow type) data
then it will call getBaseFileOnlyView(sqlContext, parameters, schema, readPaths, isBootstrappedTable, globPaths, metaClient)
it will create new Datasource and relation instance with : DataSource.apply(sparkSession = sqlContext.sparkSession,paths = extraReadPaths,userSpecifiedSchema = Option(schema),className = "parquet",options = optParams).resolveRelation()
step 4. spark fetch basePath for infer partition info (https://github.com/apache/spark/blob/v2.4.4/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala L196)
//the parameters come from DataSource #options (map type)
parameters.get(BASE_PATH_PARAM)
so parameters.get(BASE_PATH_PARAM) will call Map#get not CaseInsensitiveMap#get. and parameters stored “bathpath” . get “bathPath” will return None
this is a spark bug (fixed at 3.0.1 version https://issues.apache.org/jira/browse/SPARK-32368) hudi current used spark v2.4.4 .
in order to avoid this spark issure  a simple solution is we can not convert the input optParams type(spark already make it  CaseInsensitiveMap type) in org.apache.hudi.DefaultSource#createRelation(sqlContext: SQLContext,optParams: Map[String, String]…

@yui2010 merging. Please assign the Jira ticket to yourself and close it. If you don't have contributor access yet, please send an email with your Jira ID to the dev mailing list and someone will add you to the project. Thanks!


io: use errors.Is in reader and writer helpers

This adds broad usage of errors.Is within io helper functions to make these helpers more resilient to implementations that choose to wrap errors. Currently, if an io.Reader wraps an io.EOF error in any way, helpers like io.ReadAll will not behave as expected, since they seem to expecting a naked EOF error to be returned.

Closing as declined


What is the backbone of Trans4Trans-M in Table VII?

Hi authors,
Thanks for your great work. I want to know the backbone of Trans4Trans-M in Table VII (comparison on all-acdc) of the paper.
Best

Hi, sorry for replying late.
The backbone is the same as in Table VI, that is PVTv2-B3.


BLEDevice setPower having no affect on TxPower Level

Using ESP32 BLE Arduino 1.0.1 in Platformio IDE
I have tried several power levels using this command immediately after BLEDevice::init
BLEDevice::setPower(ESP_PWR_LVL_P7);
The advertised TxPowerLevel is always 3 in the iPhone BLE Scanner App and the RSSI values
don't change.
Seems like an old issue that was claimed to have been fixed?
Edit:
Fixed by adding all this:
 BLEDevice::setPower(ESP_PWR_LVL_P7);  // Changing had no affect.  Client reports power level = 3   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL0, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL1, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL2, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL3, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL4, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL5, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL6, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_CONN_HDL8, ESP_PWR_LVL_P9);   esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, ESP_PWR_LVL_P9);
The advertised TxPower Level is now 9 and getting about 6 dB more power than default.
Perhaps BLEDevice::setPower should call the other  esp_ble_tx_power_set statements.

no matter what i try its still -49 dbm

I saw this discussion on Espressif forum - https://esp32.com/viewtopic.php?t=21011 -- looks like it is possible with ESP's API. Haven't tried it yet - but worth a try.


Various changes

Various unrelated changes made prior to new feature development on my v2 branch in fork. I want to get these out of the way before I open further PRs.

chore: Use text=auto in gitattributes

Remove superfluous quotes in action.yml

chore: Remove build.dist.sh
It exists as a script in package.json

test: Fix up main.yml

Use yarn instead of NPM
Update version of some actions

chore: Rename .env.secrets to secrets.env
In order to support syntax highlighting consistently in VS Code and
other tooling, a shared file extension should be used for .env files.
Using secrets.env allows associating *.env to ENV-style syntax
styling and highlighting in tooling.

docs: Updates to README.md
Fix several markdown lint issues and update instructions for new
secrets.env file.

Some quick questions.
What do you recommend for formatting yml and markdown files?
If one developer uses legacy yarn (1.22.1) and another uses yarn berry, how will the repo be affected?

What do you recommend for formatting yml and markdown files?

I personally use VS Code for all my formatting. This extension for YAML and this extension for markdown. Note however that formatting markdown is harder. I typically use markdownlint to find formatting issues and fix those by hand. It's not unmanageable. Markdown formatting is useful for things like tables, though.

How will the repo be affected if one developer uses legacy yarn (1.22.1) and another uses yarn berry?

I haven't included the Yarn upgrade in this PR yet, I'm doing small changes at a time. But on my fork I am successfully using yarn v4. With that change, users cannot use v1 anymore. They need to properly install v4 and use that. I can add/update a CONTRIBUTING.md that contains installation instructions if you feel that would be helpful.


ID property is disapear when checking task (which has recurs property) as done

Please check that this issue hasn't been reported before.

[X] I searched previous Bug Reports didn't find any similar reports.

Expected Behavior
- [ ] some takss 🆔 todo 🔁 every day ➕ 2024-04-01 🛫 2024-06-05

when i checking as done i expect below
- [x] some takss 🆔 todo 🔁 every day ➕ 2024-04-01 🛫 2024-06-05 ✅ 2024-06-21
- [ ] some tasks 🆔 todo 🔁 every day ➕ 2024-06-21 🛫 2024-06-21

Current behaviour
- [x] some takss 🆔 todo 🔁 every day ➕ 2024-04-01 🛫 2024-06-05 ✅ 2024-06-21
- [ ] some tasks 🔁 every day ➕ 2024-06-21 🛫 2024-06-06

ID property is disapear and starts date is not same with my expectation.
Steps to reproduce
checking task as done
Which Operating Systems are you using?

[X] Android
[X] iPhone/iPad
[ ] Linux
[X] macOS
[ ] Windows

Obsidian Version
1.6.3
Tasks Plugin Version
7.4.0
Checks

[X] I have tried it with all other plugins disabled and the error still occurs

Possible solution
creating new tasks for recurs tasks

Hi, thanks for using Tasks.
There are two independent parts to this question...
Why are dependency (🆔 and ⛔) removed when completing recurring tasks
This is intentional. As you're the second person to ask about this, I've just written and published documentation explaining why...
See the earlier discussion here:

https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2782

Why the new recurrence is date on 2024-06-06
That's just the way that recurrence works.
Please see its documentation:  Recurring Tasks (Repetition)
The section describing the behaviour you want is Repeating a Task Based on the Original Due Date or the Completion Date - using the when done option.
In your example, if we start with this:
- [ ] #task some takss 🔁 every day when done ➕ 2024-04-01 🛫 2024-06-05

And complete the task on 2024-06-21, we get this:
- [x] #task some takss 🔁 every day when done ➕ 2024-04-01 🛫 2024-06-05 ✅ 2024-06-21
- [ ] #task some takss 🔁 every day when done 🛫 2024-06-22

It differs from your requested behaviour in that the next date is 2024-06-22 because the task was already done on 2024-06-21 so there is no point having another instance due today.

Sorry.. before write this issue, i looked for only open issue, not closed one.. sorry

Sorry.. before write this issue, i looked for only open issue, not closed one.. sorry

No problem at all. That’s a really good point, and entirely on me. There are so many closed issues that I make the filters in the issue templates only search open ones.


Low Priority Requests.

Few requests I think are good for everybody.
This changes can be done by scripts so are not necessary, but for people who looks for best performance as possible, being forced to script what sphere already does better and faster is a little mess. Little changes could safe custom servers to become heavier than they should be.
///////////////////
New Triggers://
////////////////
on=@itemBeingCarved
| -> Corpse being
carved
src ->playerCarving
Return 1 ->Prevent all
Return 0 ->Prevent resource gathering but effects.

Reason: Right now, If u want to do any change on corpse carving, it forces you to redo entire system by script and modify every typedef able to carve corpses.
As always, sorry for my poor eng.
/////////////////////////////

On=@Smelting
argo-> item being smelted
src- character
Return 1->Prevent all
Return 0->Allow effects, but no resource gathering

Reason: Right now, If u want to do any change on smelting system, it forces you to redo entire system by script. Sphere does it better and faster. We should have access to it instead being forced to script entire system. For example, if I want to modify Ore-ingot exchange rate, I am forced to redo everything by script.
///////////////////
FUNCTIONS//
////////////////
[CANSEE CANSEELOSS]
Return <FirstBlockCoordinate> instead just "return 1"

Reason: Same as above, if u want to know where vision gets blocked, u need to script a custom canseeloss's function when normal "canseeloss" already knows where light of sight get blocked and it just needs to be returned. This is a very heavy and common function to be done by script.
With this fix, Scripts would works as ever with this change, Scripts use to check if there is a return, not the value itself, so nobody should realize the fix. It would just return a coord instead "1", letting us know where the vision gets blocked.
If it is not possible to modify it, I think a "CanseelossP" function should be created.
/////////////////////////////
[RAISECORPSE] FIX request
(moved to issue #620)

/////////////////////////////
[Function IsLayered]
Return 1 if item is layered on a corpse

This function already exist in sphere (not with the same name), so sphere can check if an item is layered or not in a corpse.

Would be nice to let us use it so we dont need to create tags to check which items are equipped or not.

Wild @drk84  found a very easy way to solve the [Function islayered]'s issue.

ty drk84

I think this can be closed


Error in reverse_bits()  method when used with circuits with isolated qubits

Information

Qiskit Terra version: 0.18
Python version: 3.7

What is the current behavior?
This follows #6574 . When a QuantumCircuit is initialized with isolates qubits there are some issues as follows

[ ] qc.reverse_bits() returns an empty QuantumCircuit object with no qubits or clbits when qc has no gates.
[ ] qc.reverse_bits() returns list index out of range error when qc has atleast 1 gate. (from #6574 )

Steps to reproduce the problem

from qiskit import *
from qiskit.circuit import Qubit

qc = QuantumCircuit([Qubit(), Qubit()])
qc_rev = qc.reverse_bits()
print(qc_rev.qubits)  # Returns []

from qiskit import *
from qiskit.circuit import Qubit

qc = QuantumCircuit([Qubit(), Qubit()])
qc.h(0)
qc_rev = qc.reverse_bits()  # Returns `list index out of range`

I'd be happy to work on this if no one else is.

@apcarrik Yeah sure please go ahead and please feel free to leave a message if you need some help.😃

Thanks @TharrmashasthaPV! For clarification, is the intent of passing a list of Qubits as an argument to QuantumCircuit() to create a QuantumRegister implicitly with them? Currently, it updates the QuantumCircuit._qubits and QuantumCircuit._qubits_set properties, but does not create a quantum register in the quantum circuit, which causes the issues in QuantumCircuit.reverse_bits() method that we're seeing.

Thanks @TharrmashasthaPV! For clarification, is the intent of passing a list of Qubits as an argument to QuantumCircuit() to create a QuantumRegister implicitly with them? Currently, it updates the QuantumCircuit._qubits and QuantumCircuit._qubits_set properties, but does not create a quantum register in the quantum circuit, which causes the issues in QuantumCircuit.reverse_bits() method that we're seeing.

@apcarrik Not exactly. The input to the circuit is a set of registerless qubits. And so we would like to keep the qubits that way without creating a quantumregister. I think currently reverse_bits() returns a circuit that only contains reversed registers. However, we need to fix it to also contain the reversed registerless qubits and registerless clbits without creating registers for them.

Thanks @TharrmashasthaPV! For clarification, is the intent of passing a list of Qubits as an argument to QuantumCircuit() to create a QuantumRegister implicitly with them? Currently, it updates the QuantumCircuit._qubits and QuantumCircuit._qubits_set properties, but does not create a quantum register in the quantum circuit, which causes the issues in QuantumCircuit.reverse_bits() method that we're seeing.

@apcarrik Not exactly. The input to the circuit is a set of registerless qubits. And so we would like to keep the qubits that way without creating a quantumregister. I think currently reverse_bits() returns a circuit that only contains reversed registers. However, we need to fix it to also contain the reversed registerless qubits and registerless clbits without creating registers for them.

Ok, thanks for clarifying that.

@apcarrik Is the issue fixed? Or else, I would like to give it a try.

@apcarrik Is the issue fixed? Or else, I would like to give it a try.

There was a lengthy discussion on what exactly the desired behavior is for this, which never really came to a consensus (see PR #6762.

@apcarrik Ok. Sorry, I didn't know about all this progress regarding fixing this issue. Thanks for updating that you are continuing on fixing it.

@Gaya3-mv No need to apologize! I just wanted to let you know what was discussed on the PR. I'm going to close the PR since it's stale, and it seems like #7628 addresses the broader issue of treating isolated qubits and qregs similarly. Feel free to pick this issue or #7628 up!

Ok. Thanks again for the details regarding the status of the issue!

Hi, is this issue open and not assigned, could I work on this issue?

Hi, is this issue open and not assigned, could I work on this issue?

Feel free to pick it up.


:bug: Fix: Prefixed storage keys

Description
Concise description of proposed changes
Testing
Explain the quality checks that have been done on the code changes
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

#1095  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @roninjin10 and the rest of your teammates on  Graphite


Example complete-http doesn't work

Hello
I used the complete-http example to create an api gatway to trigger my lambda. I copied and pasted the same code, it creates the lambda and the apigatway, but the lambda has no layer, so the lambda is not accessible. So I have to link it via the console using the following command:
aws lambda add-permission \
 --statement-id 5282ce2a-89af-58f2-nv456-a2a98f5bfe92 \
 --action lambda:InvokeFunction \
 --function-name "arn:aws:lambda:eu-west-3:************:function:ample-mink-lambda" \
 --principal apigateway.amazonaws.com \
 --source-arn "arn:aws:execute-api:eu-west-3:************:qvtfwsdifj/*/*/"

At first glance, I have the impression that the order in which the resources are created is not good. Can you help me please, below my code:
###################
# HTTP API Gateway
###################

module "api_gateway" {
  source = "terraform-aws-modules/apigateway-v2/aws"

  name          = "${random_pet.this.id}-http"
  description   = "My awesome HTTP API Gateway"
  protocol_type = "HTTP"

  cors_configuration = {
    allow_headers = ["content-type", "x-amz-date", "authorization", "x-api-key", "x-amz-security-token", "x-amz-user-agent"]
    allow_methods = ["*"]
    allow_origins = ["*"]
  }

  domain_name                 = var.http_01_domain_name
  domain_name_certificate_arn = data.aws_acm_certificate.certificate.arn

  default_stage_access_log_destination_arn = aws_cloudwatch_log_group.logs.arn
  default_stage_access_log_format          = "$context.identity.sourceIp - - [$context.requestTime] \"$context.httpMethod $context.routeKey $context.protocol\" $context.status $context.responseLength $context.requestId $context.integrationErrorMessage"

  integrations = {
    "ANY /" = {
      lambda_arn             = module.lambda_function.this_lambda_function_arn
      payload_format_version = "2.0"
      timeout_milliseconds   = 12000
    }

    "$default" = {
      lambda_arn = module.lambda_function.this_lambda_function_arn
    }

  }

  tags = {
    Name = "dev-api-new"
  }
}
data "aws_acm_certificate" "certificate" {
  domain = var.https_certificate_domain_name
}

# Domain name in front of API Gateway
# In a real project, this might go to another layer (or to sysadmin/terraform/90_dns)

data "aws_route53_zone" "this" {
  name = var.dns_zone_name
}

##########
# Route53
##########

resource "aws_route53_record" "api" {
  zone_id = data.aws_route53_zone.this.zone_id
  name    = var.http_01_domain_name
  type    = "A"

  alias {
    name                   = module.api_gateway.this_apigatewayv2_domain_name_configuration.0.target_domain_name
    zone_id                = module.api_gateway.this_apigatewayv2_domain_name_configuration.0.hosted_zone_id
    evaluate_target_health = false
  }
}

##################
# Extra resources
##################

resource "random_pet" "this" {
  length = 2
}

resource "aws_cloudwatch_log_group" "logs" {
  name = random_pet.this.id
}

#############################################
# Using packaged function from Lambda module
#############################################

locals {
  package_url = "https://raw.githubusercontent.com/terraform-aws-modules/terraform-aws-lambda/master/examples/fixtures/python3.8-zip/existing_package.zip"
  downloaded  = "downloaded_package_${md5(local.package_url)}.zip"
}

resource "null_resource" "download_package" {
  triggers = {
    downloaded = local.downloaded
  }

  provisioner "local-exec" {
    command = "curl -L -o ${local.downloaded} ${local.package_url}"
  }
}

data "null_data_source" "downloaded_package" {
  inputs = {
    id       = null_resource.download_package.id
    filename = local.downloaded
  }
}

module "lambda_function" {
  source  = "terraform-aws-modules/lambda/aws"
  version = "~> 1.0"

  function_name = "${random_pet.this.id}-lambda"
  description   = "My awesome lambda function"
  handler       = "index.lambda_handler"
  runtime       = "python3.8"

  publish = true

  create_package         = false
  local_existing_package = data.null_data_source.downloaded_package.outputs["filename"]

  allowed_triggers = {
    AllowExecutionFromAPIGateway = {
      service = "apigateway"
      arn     = module.api_gateway.this_apigatewayv2_api_execution_arn
    }
  }
}

Lambda layers are optional and can be used inside of Lambda functions.
Update arn inside of allowed_triggers to match --source-arn "arn:aws:execute-api:eu-west-3:************:qvtfwsdifj/*/*/" and it will create the same permission as you get when running AWS CLI command.
See this for example.

Thank you for your answer, but even with your proposal it still doesn't work.
here's what I did:
  allowed_triggers = {
    AllowExecutionFromAPIGateway = {
      service    = "apigateway"
      source_arn = "${module.api_gateway.this_apigatewayv2_api_execution_arn}/*/*"
    }
  }

After an application, looking in the aws console I got this.
{
  "Version": "2012-10-17",
  "Id": "default",
  "Statement": [
    {
      "Sid": "AllowExecutionFromAPIGateway",
      "Effect": "Allow",
      "Principal": {
        "Service": "apigateway.amazonaws.com"
      },
      "Action": "lambda:InvokeFunction",
      "Resource": "arn:aws:lambda:eu-west-3:123456789012:function:more-pigeon-lambda",
      "Condition": {
        "ArnLike": {
          "AWS:SourceArn": "arn:aws:execute-api:eu-west-3::il2yc9qa4g/*/*"
        }
      }
    }
  ]
}

I tried to tinker a bit to format the policy, and finally it worked but adding the account id<PHONE_NUMBER>12) like this:
- source_arn = "${module.api_gateway.this_apigatewayv2_api_execution_arn}/*/*"
+ source_arn = "arn:aws:execute-api:eu-west-3:123456789012:${module.api_gateway.this_apigatewayv2_api_id}/*/*/"

is it a bug or am I the one who's crashing somewhere?

Make sure that your provider block does not have skip_requesting_account_id   = true as explained here - https://github.com/antonbabenko/serverless.tf-playground/blob/master/terraform/main.tf#L10-L11


BUG ROLES IN RAZOR PAGE (Blazor)

Bug in razor pages User role.
I added 3 roles when creating jwt , claimtypes.
Roles looks like that:
type:http://schemas.microsoft.com/ws/2008/06/identity/claims/role, value: ["Hello"
type:http://schemas.microsoft.com/ws/2008/06/identity/claims/role, value: "Admin"
type:http://schemas.microsoft.com/ws/2008/06/identity/claims/role, value: "SuperAdmin"]
<AuthorizeView Roles='"SuperAdmin"]'> it works
but <AuthorizeView Roles='SuperAdmin'> it is not working

Moving this to runtime, for a potential issue with the AuthorizeView component. The specific attribute formats seem to work fine in other scenarios.


cannot save vm on windows

2015-11-24 09:40:51 INFO  ==> WordPress: Saving VM state and suspending execution...
2015-11-24 09:40:59 ERROR There was an error while executing `VBoxManage`, a CLI used by Vagrant
2015-11-24 09:40:59 ERROR for controlling VirtualBox. The command and stderr is shown below.
2015-11-24 09:40:59 ERROR 2015-11-24 09:40:59 ERROR Command: ["controlvm", "c28e79cc-41a8-4540-b439-402b03199152", "savestate"]
2015-11-24 09:40:59 ERROR 2015-11-24 09:40:59 ERROR Stderr: 0%!.(MISSING).10%!.(MISSING).20%!.(MISSING).30%!.(MISSING).40%!.(MISSING).50%!.(MISSING).60%!.(MISSING).70%!.(MISSING).80%!.(MISSING).90%!.(MISSING).
2015-11-24 09:40:59 ERROR Progress state: RPC_S_CALL_FAILED 0x800706BE
2015-11-24 09:40:59 ERROR VBoxManage.exe: error: Failed to save machine state
2015-11-24 09:40:59 ERROR VBoxManage.exe: error: The object is not ready
2015-11-24 09:40:59 ERROR VBoxManage.exe: error: Details: code E_ACCESSDENIED (0x80070005), component SessionMachine, interface IMachine
2015-11-24 09:40:59 ERROR VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleControlVM(struct HandlerArg *)" at line 276 of file VBoxManageControlVM.cpp

this leaves vagrant status as 'aborted'

I wonder if you require running nanobox 'with administrative priveleges' on windows like this if the accessdenied errors will subside

@glinton I added in a manifest and am running in admin and still (on occasion) get the same error message


Question about backward compatibility and versioning

In the readme I read:
This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.

Oh, I can understand, it's fine, taking into account it's an alpha version, but from the API consumer point of view, I should be concerned about interface inconsistency across multiple patch versions?

I honestly think that this package has too much responsibility and this make a bit difficult versioning it and orchestrate properly all the roadmap and therefore API features
Thanks

Fear not, we will be following semver as closely as possible. If we introduce breaking changes, we will bump minor version. Bug fixes and api regenerations will be patch bumps. A major bump is not in our immediate sights and shouldn't be necessary unless all the APIs drastically change overnight.

Thanks, I guess my fear disappears with your explanation. That's all. Closing


Register vertica driver

Vertica now as a native go driver (https://github.com/vertica/vertica-sql-go).
I've successfully used the vertical-sql-go driver with sql_exporter.

@grzm  any plans to fix PR? Would be useful to have this functionality!

Hi
Any progress here, I also succeed to start sql_exporter with Vertica driver


Display Popup On Change

Display the "Bookmarks have been updated" popup only when the bookmarks actually have changed.

@mbechto Thanks for the suggestion. I agree that this would be better UX.
Unfortunately the update mechanism is currently very simple - we just replace the bookmark trees entirely instead of performing some kind of diff. This avoids a potentially buggy diff/merge and is fast enough so far.
I'll take another look and see if there is a simple alternative to detect differences for this purpose.

Maybe it would be possible to save the git commit hash somewhere and compare that?

@mbechto  Good suggestion and feasible, thanks.
I will implement that and consequently increase the update frequency a bit since now the popups will only appear if necessary.
The manual sync button is already designed to force a sync and should therefore bypass the revision check. This should help sort out accidental changes done to these bookmarks by the user.

I remembered that I was already using ETags received from the GitHub REST API and caching them in order to prevent uneccessary updates to the bookmarks in case the source (file or directory) was unchanged.
Unfortunately this didn't work because the cached ETag was lost between bookmark syncs. The synchronization happens event-driven inside of a so-called background script. These are unloaded after a period of idle time by the browser, thus losing any state saved.
I fixed this in #40 and consequently increased the bookmark sync frequency to hourly in #41.


Add .bin to integration test PATH.

Without this, we actually use the system CF CLI which may be a different version than we expect.

Closing in favor of: https://github.com/cloudfoundry/buildpacks-github-config/pull/2


Included the task to check the status of admission server in openebs deploy litmus book

Signed-off-by: nsathyaseelan<EMAIL_ADDRESS>
Removed the task to check the status of default sparse pool pod
Included task to check the admission server in openebs deploy litmusbook

\lgtm


tvOS support

@esegebart I've got good news!
I managed to play around with the source code and the tvOS here: https://github.com/criszz77/tvOSWithTypeScript
What I'm still fighting with? Seekbar and volume bar don't seem to work. But other than that, everything seems good so far.

@esegebart You can try yarn add<EMAIL_ADDRESS>it should better work for tvOS now, but it's still a lot to work on.

@criszz77 Omgsh! You are amazing!!! I will try it out on my project on Monday! ❤ How long have you been doing react native? And how did you learn to do it so well? I need to level up my react native skills!

@esegebart

Omgsh! You are amazing!!! I will try it out on my project on Monday! ❤

Hey, thank you! I'm really passionate, but I don't feel I'm that good, there are much better people here on GitHub.

How long have you been doing react native? And how did you learn to do it so well?

I have been working for like 6-7 years now with different technologies, but when I came across React Native I fell in love instantly. The idea of building multi platform apps with React Native got my attention and since then I spend a lot of my spare time investigating it.

I need to level up my react native skills!

I can honestly say that I've learned the best from open source. And of course, I'm always happy to share the knowledge and help other enthusiasts, so feel free to give me a sign on any matter, not just the video player. I guess our time zones are pretty different, but I usually respond very fast.
... speaking of multi platform apps... I'm really interested in making this library work with tvOS, and I would love to learn more about the project you're working on and understand your requirements better.
So far I've got a few questions:

Do you need the volume bar? I believe you can control the volume from the Firestick/remote control, so you wouldn't need a volume bar (can be disabled with disableVolume prop).
Do you need to interact with the seekbar? You have the rewind/forward buttons and you can customize the time for them with rewindTime prop.
When the controls appear on the screen, I believe the play button should always be focused?
What other requirements or issues do you think we might have?

Other than that, I guess I'll wait for you to try it on Monday, and we'll see then what more comes up.
Have a nice weekend! ⭐

Amazing! I, too, fell in love with React Native and want to be really good at it so I will try and get into open source projects more (this one too!).
But I can let you know the requirements!

I do not need volume. I am using the disable volume.
I do not need Fullscreen which I use the disable Fullscreen prop also.
I need the rewind/fast forward time (probably 15s would be good).
There are two different streams this could be: an archived video which I feed the video player a uri and it plays or it could be a live video and that's where I would disable the seekbar and show a LIVE icon in the bottom of the screen, but would need to be able to pause it which I am sure would work the same.
Yes the play button having preferred focus would be perfect!
Being able to pop up the controls with a button press, interact with controls with remote, and autohide after 3-5 seconds would be great!

Play/pause, rewind/fast-forward, seekbar, time duration and time elapsed, and hide controls, are about all I need! :)
This would really be the first repo that I have seen that would be able to seamlessly interact with react-native-tvos as controls without having to custom build them. 😍
Super exciting!!!!

@esegebart You can now try yarn add react-native-media-console@next. I'll also test it better on a non tvOS project to be sure I didn't break anything for mobile only.

[X] I do not need volume. I am using the disable volume.

[X]  I do not need Fullscreen which I use the disable Fullscreen prop also.

[X] I need the rewind/fast forward time (probably 15s would be good).

Customizable with rewindTime

[X] There are two different streams this could be: an archived video which I feed the video player a uri and it plays or it could be a live video and that's where I would disable the seekbar and show a LIVE icon in the bottom of the screen, but would need to be able to pause it which I am sure would work the same.

Yep, streaming video is part of react-native-video library, while you can use disableSeekbar and show your LIVE icon with absolute positioning. Of course, the playPause functionality I believe you are already familiar with it.

[X]  Yes the play button having preferred focus would be perfect!

Fixed, but we have to be careful at this: https://github.com/react-native-tvos/react-native-tvos/issues/344

[X]  Being able to pop up the controls with a button press, interact with controls with remote, and autohide after 3-5 seconds would be great!

Controls will now be shown on any TV handler event and the  playPause button will be focused. There's the  controlTimeoutDelay prop to hide controls after X amount of time in milliseconds.

@criszz77 I am speechless! I wish I knew how to just whip something up like that! Soooo cool! Can't wait to try it tomorrow! :)

@criszz77 You are literally a genius. Amazing how quickly you were able to whip this up! Confirmed tested on Firestick TV app. Will be testing on Android TV and tvOS in the near future!!!

@esegebart

You are literally a genius. Amazing how quickly you were able to whip this up! Confirmed tested AND working on Firestick TV app. Timeout delay, rewind, fast forward, play/pause, all working. Will be testing on Android TV and tvOS in the near future!!! THANK YOU!!!

Thank you! I really enjoyed playing around with react-native-tvOS and I think that the project you're working on is very interesting. On Android TV Simulator seems to be working fine. It wasn't that hard actually! You'll see when I open the PR, I'll add you as a reviewer.

If you have some issues I could try and tinker on, I would love to do so or help with documentation!

Well, again, if you have some suggestions or requirements, I can guide you to do the changes yourself. For instance, I'm thinking that you should be able to pass your own icons/images for the controls. Even styles and props? But, if I don't need them - I don't feel like doing them :(

I noticed this uses typescript - what is a good resource to learn more about typescript?

Well,I will never go back to JS. TypeScript is just a super set of JavaScript, it's basically JavaScript behind the scenes. TypeScript adds type checking. , for example if you declare a const as a string, assigning a number will throw you an error in TypeScript, but not in JavaScript.
Depending on how you like to learn, there are multiple resources.
I also have a repository where I keep all the interesting links that I don't want to lose: https://github.com/criszz77/react-js-links
And some videos from youtube to start:
Short Intro: https://www.youtube.com/watch?v=ahCwqrYpIuM
Deep Dive: https://www.youtube.com/watch?v=BwuLxPH8IDs
I will create a PR and a release today or tomorrow. Have fun!

Woohoo!!! I think this pretty much covers all of the basics and the icons look really nice and accessible. I prefer the rewind fast forward buttons, but I wonder if people will try to use the seekBar to rewind and fast forward like you are able to on Netflix? This is definitely not a requirement - but could be something I can play around with for fun!


light client guide: upgrades

Summary
Explain how to implement VerifyUpgradeAndUpdateState

For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate contributors tagged/assigned

ref: https://ibc.cosmos.network/main/ibc/upgrades/developer-guide.html


need your help on project , please .

Hello.
I want to create a proxy on python i just code most of the proxy :
https://github.com/ingnelson/proxy_python_not_finish/blob/master/proxy.py
I want the python proxy on port 80 create the connection between the client (android or PC) and my SSH server on port 442.
The python proxy and the SSH server are running on my VPS Ubuntu.
similar to this :

but my proxy stop at the connection like this :

can you please check the my proxy , please ?

Hi ingnelson, thanks for your question. But sorry, I have no time to analyze your project or your ssh configuration. The provided details are not enough for a quick fix. Regards, Flo

Additional info: I'm using my ForwardProxy via HTTPS.
Calling an Apache HTTP Server on public port <IP_ADDRESS>:443, forwarding to ForwardProxy port <IP_ADDRESS>:9899, forwarding to a local HTTP port <IP_ADDRESS>:8081. Works fine for me.


chore(github-action): add a release note generator on tag

A release draft will be generated on github for each tag matching X.Y.Z.

I'm not sure how to compare this with our manual CHANGELOG.md file
It sure is nice to have it automatic but I'm not sure the commit message are enough information for us to properly document evolutions on the Lumx library.
The commit granularity can be both too big or too tiny for a library changelog
What do you think @matmkian @pidupuis ?

I agree that we need to continue to manually redact a CHANGELOG to only list useful informations.


[Add/Edit Observation] Date/time fields don't respect user's preferred formats

We should use android.text.format.DateFormat.getDateFormat(context), but DateResponse and TimeResponse are context-agnostic. Formatting should instead be done in the view layer, with the response objet's String representation used for debugging only. Fyi @HemanParbhakar, discussed in #749.

@HemanParbhakar Would you like to tackle this one once #846 is merged?

@shobhitagarwal1612 assigning to you for now, please reassign if needed!


Develop

first pull request for staking token
I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Token Address: 8EDaoeBqpcVACwvkYXh1vAcU29HiBiNhqoF4pRsuUsZS
Token Name: SunnySideUp staked SOL (sSOL)
Token Symbol: sSOL
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token: https://www.sunnysideup.finance


How to force hash-based routing.

How do I force router to use hash-based routing?

Please follow the issue template.

I'm using mobile, looks like issue templates don't appear there.
Also parsing hashes myself to implement hash-based routing completely defeats the purpose of even using Next router.
So on older browsers you don't have hash based routing?
Or you do? And if you do, how to I tell Next to use that fallback?
And if there's no way to tell Next to use hashes for all routes, then this is a feature request and it'd be great to re-open this in that case.

By the way, non-hashed routing does not work on AWS S3 or CloudFront without having to write a AWS Lambda function, because by default AWS does not serve index files for any path except for root /.
So if Next doesn't have a Hash routing, then by default it does not work on AWS static hosting.

@trusktr old browsers will rely on normal link with page reload instead of being a SPA, thanks to SSR it will work as a normal web page.
About AWS S3 and CloudFront, the only way to use them with Next is made use of the static export feature, in that case you don't have dynamic routes, just static files you can drop in AWS S3 and let it serve them.

In case maybe you misunderstood what I was talking about, I want to enable routing that works like legacy, where all paths are like follows:
example.com/#/
example.com/#/one/
example.com/#/one/two/
example.com/#/one/two/three/
example.com/#/posts/
example.com/#/posts/this-is-the-post-slug
example.com/#/users/
example.com/#/users/username

where every single route is hash-based.
I'm not asking how to handle a single hash, I know how to do that.
I would be surprised if this option didn't exist in Next.js.

it's up to you to parse them.

If you already knew what I meant when you said that, then that's the same as saying "don't use Next, forget about Next file system-based route structure, forget about SSR, just use plain React and make your own router".
So hoping maybe you didn't know what I meant. :)

If you want to use hashbang URLs you can't use SSR, since /# and /#/one is the same route server side, so there is no way for the server to know what to render, it will need to send a basic template and let the client fill it, in that case I think using CRA with React Router and its HashRouter is a better option, that way you will have a single index.html and let the client decide what to render.

The lack of this feature in Next makes it inflexible.
If I was using Now, things would be in better shape (though I had issues deploying even a Next website to there). I'm not going to be able to tell my org "hey, let's just switch from AWS to Now". They're not going to take that lightly.
My honest suggestion for Next authors is to make this very necessary improvement, not even for supporting older browsers, but for supporting unfortunately-restricted server environments like AWS S3 and CloudFront (which is a widely-used hosting solution).

Also note, other routers handle things like onHashChange on top of the hash-based routing.
For example beside being able to have routes like
example.com/#/posts/
example.com/#/posts/this-is-the-post-slug

it is still possible to handle regular hashes (f.e. to scroll to part of an article):
example.com/#/posts/this-is-the-post-slug#some-heading


fix(build): migrate setup.py to pyproject.toml

This commit migrates the project from the setup.py style of publishing to using pyproject.toml instead.

:tada: This PR is included in version 3.20.5 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Created CodeTrek Seeder To Seed CodeTrek Applicants

Targets #3099

Description

Made Changes So That seeder do not run in production environment
Checklist:

[x] I have performed a self-review of my own code.

**Unit Testing **
Running Command

Database Entry

Why did you create this new PR? Please make these changes in this PR https://github.com/ColoredCow/portal/pull/3099. and then close it.


The  specified is invalid.

Hello! I deactivated the plugin on localhost as it doesn't work there, and I'm asked to write why I'm deactivating it.
When I try to do so, however, it gives me this message:

"Skip and deactivate" works flawlessly, however.
Setup:
WordPress 6.3.2 using Sage 9 with MariaDB.
PHP 8.1.

Hello,
Thank you for reporting this issue, I am very surprised this is happening. The way I create this bit is that each feedback is stored in a specific region and for some reason the region was not set for you.
Can you please check the latest version? (1.5.4) If this behaves the same way, can you please do the following for me:

Go to https://reqbin.com/
Enter URL: https://api.mecanik.dev/v1/developer/af87c346-67e8-4c94-a4d2-c5a5db65b4c7/geo-info
Enter Authorization Token: lu-3VkkHTqTOnQ8JDRuadMAJErJQvBSQXaZL04igSTs

Execute a GET request and show me the response please.

Thank you for this. I cannot believe my eyes... when the code cannot determine your "default" region, it should return one. Instead of returning the correct region, it returned literally "default" ("recommended-storage-region": "default")... I have fixed this now and it should work accordingly.
Still curious why based on your GEO info the region cannot be determined.


📦 Update cumulusci

Hm, we now have a dependency version conflict between boto3 and cumulusci:

ERROR: botocore 1.12.155 has requirement urllib3<1.25,>=1.20; python_version >= "3.4", but you'll have urllib3 1.25.2 which is incompatible.

ERROR: cumulusci 2.5.0 has requirement urllib3==1.25.2, but you'll have urllib3 1.24.3 which is incompatible.

@jgerigmeyer I'm confused, because this commit in botocore that should allow urllib3 1.25 claims to be included in the botocore 1.12.155 tag: https://github.com/boto/botocore/commit/3a6bd282307ff91cbd04f2a7dfa6369c08015d2f

@jgerigmeyer possible fix in https://github.com/SFDO-Tooling/MetaDeploy/pull/335


Preserve sign on negative zero f32

-0 is parsed as 0 for f32 type.
Is it intentional? I know that this is an edge case, but this is somewhat important for my use case, because it technically two different values.
rustc 1.54.0, serde_json v1.0.67

Wow, thanks!


Message routing

Hello
When a user send a message to another, everyone can see the message in the Messaging module ! Strange ! This happens even when no stream is defined ! any idea ? Thanks for your help

Sounds like you message permissions need to be fixed, I'll have a look at this

ok, i'm available to detail my config

Do you have details or guidelines to manage permissions for each module by the way ?
Thanks for your help

I'm afraid I haven't written documentation on permissions, permissions code was originally written by @letoosh and I'm in the process of creating new UI to make it easier to manage. You will need to set Full Access to some group(s) / people and Read Only to others to be able to limit access.

Ok, but for messaging, i've tried but it does not fix the problem : in addition to module access, each message sent is set based on Global settings apparently, and and i've tested all cases. The combination of Module Access and Global setttings is not working...
If you need help for specifications i'm here, i have some experience on Big Project Portfolio Management solutions !

I guess the problem comes from two points :
1 -  i've not setted any stream - i'm not sure about the configuration of Treeio messaging system ? What is a stream in fact ?
2 - When a user sends a mail, the permissions applied are based on the Global Settings : i.e. the the sender can be set with the appropriate permission, but the receiver cannot see the message as he not set with full access rights or even Read Only...
Hope this helps


Proxy issues

When we do a
"npm install" against our
"package.json" we are facing proxy issues, but not with one of our 150 packages, only with "grunt-contrib-imagemin".
Any ideas?

https://github.com/kevva/download/issues/64


Let vwifi support VirtIO

I finally figured out what we could do in next step.
The inspiration from the following slides Virtual WiFi: Bring Virtualization from Wired to Wireless

Our target is to ensure that the real-chip driver can run on the guest OS and that the vwifi driver can support as a backend driver which is running on the host Linux KVM or QEMU
However, the target is too big. What can we do as the first step, or what is a simpler scenario could advise?

I have figured out a rather simple scenario here: https://hackmd.io/@rickywu0421/vwifi_virtio. Please take a look.

Please see #PR45, and note that I haven't modified the https://hackmd.io/@rickywu0421/vwifi_virtio for a while, so please do not look into it :)

Action items:

Make virtio support compile-time configurable
Refine top-level documentation by moving some setup/descriptions into automated scripts.

Raizo62/vwifi simulates Wi-Fi (802.11) between Linux Virtual Machines.

It can be used in Hypervisors (GNS3, QEmu, Virtualbox, VMware, Hyper-V, ...)
The Wireless emulator uses the mac80211_hwsim linux driver
Implements the packet loss simulation based on distance
Emulates the node mobility in GNS3


Add Hawk dependency and auto reloading

Problem
There is no way to auto reload your Duct project currently. See: https://github.com/duct-framework/core/issues/12
Solution
As stated in https://github.com/duct-framework/core/issues/12 we can add Hawk as a dependency and write our own watcher.
Usage:
lein repl
(dev)
(auto-reset)
;; From here you can change any (Clojure / EDN) file
;; in `src/` or `resources/` and the `(reset)` command
;; will execute in a separate thread.

Notes

The auto-reset-handler was throwing an illegal state exception because of *ns*

;; java.lang.IllegalStateException: Can't change/establish root binding of: *ns* with set

I fixed this by binding ns and then changing the namespace to dev. However I'd gladly accept a better solution

There's quite a lot of additions to dev.clj, and most of it is private. Would you like me to create a separate namespace for the auto reloading code? If so would you please provide a suggestion?

Thanks for the PR. Before we talk about the actual code, the code needs to be moved to the duct.core.repl namespace, which is part of the duct/core library. This avoids unnecessary code in the project template.

Thanks for your feedback. I'll close this and move it to core.

Moved to https://github.com/duct-framework/core/pull/24


Reedit wording for takecredits

When I was taking away credits from a certain user since they were unicoded, it said this when I did the command /takecredits alliancecrimson,11
You removed 11 credits from alliancecrimson
Mighty Sciz has given 11 credits to alliancecrimson
So, I made this PR so then the wording for takecredits can make a bit more sense, because that the users were confused into thinking that I was giving him more credits.

The line I was updating with the wording with

User has taken [number of credits] from [user.name]

was the line with Room.add("marketplace") in it by the way.


Support for EnvironmentContext inside Components

type Container =
    { ServiceA: IServiceA
      ServiceB: IServiceB }

let ContainerKey = EnvironmentKey.Create<Container>("Container")

let grandChild() =
    Component() {
        // Retrieve the environment value for the key
        let! container = Environment.Get(ContainerKey)

        Button("Click me", fun () -> container.ServiceA.DoSomething())
    }

let child() =
    Component() {
        // Note here that the environment context can skip over several layers of component
        VStack() {
            grandChild()
        }
    }

let parent (container: Container) =
    Component() {
         // Define the environment value
         do! Environment.Set(ContainerKey, container)

         child()
    }

It is also possible to add more environment values down the hierarchy (only accessible to descendants) and override environment values down the hierarchy as well (still only for current level and descendants).
let EnvKey1 = EnvironmentKey.Create<int>("EnvKey1")
let EnvKey2 = EnvironmentKey.Create<int>("EnvKey2")

let grandChild() =
    Component() {
        let! envValue1 = Environment.Get(EnvKey1) // Will be 20
        let! envValue2 = Environment.Get(EnvKey2) // Will be 40

        (...)
    }

let child() =
    Component() {
        let! envValue1 = Environment.Get(EnvKey1) // Will be 10
        do! Environment.Set(EnvKey1, 20)
        do! Environment.Set(EnvKey2, 40)

        VStack() {
            grandChild()
        }
    }

let parent (container: Container) =
    Component() {
         // Define the environment value
         do! Environment.Set(EnvKey1, 10)

         child()
    }

@edgarfgp I couldn't do something like SwiftUI with the .environment(key, value) modifier because Fabulous doesn't allow for repeated modifiers (only the last one will be kept), and modifiers are evaluated only after the children have been evaluated, so the environment declarations would come too late anyway 😅


add ability to keep old version

Not sure if this feature exists but not documented. If I use zero-downtime deployment, the process deploys the new version and deletes the old. Is it possible to add a feature which will always keep the old version and just rename it and remove the route? This allows us to rollback without much downtime in case the new app comes online and crashes later. Has this come up before?

@ps0296, this sounds like a help use case. Would you be willing to provide a pull request with tests?

This would be useful for us as well, but does not appear to be possible using the current blue-green mechanism.
https://github.com/concourse/cf-resource/blob/0a0ad7c2396b5622f892316b27356dc79ed70e1d/out/cloud_foundry.go#L38-L45
zero-downtime-push is provided by https://github.com/contraband/autopilot, which does not support leaving the old version in a stopped (but not deleted) state.
There are also no plans for autopilot to support that use case, see contraband/autopilot#27.

Hi.
I think the same way as @ps0296 .
This resource use contraband/autopilot plugin which does not correspond to keeping old versions.
Is not acceptable to use sakkuru/rollback-push corresponding to rollback?


Possible mismatch between type script interface declaration and implementation of Error

In the the documents, there is the following snippet:
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
  // Handle Errors here.
  var errorCode = error.code;
  var errorMessage = error.message;
  // ...
});

However, the Error interface in lib.es5.d.ts (V 3.9.0) is declared as
interface Error {
    name: string;
    message: string;
    stack?: string;
}

I haven't tested the interface to actually see which one is correct, but there seems to be some discrepancy between the two? I haven't tried to trigger an error, so I am not sure if 'name' property is the same as 'code' but just with a different name?

The Error  definitely has a code property; the issue is with the typescript interface and the documents are fine. I'm closing this.


Lineplot Rangetool broken?

Hi,
when I execute your sample code in Jupyter:
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD'))
df = df.cumsum()
df.plot_bokeh(rangetool=True)

The following Error appears:

AttributeError                            Traceback (most recent call last)
 in
3 df = df.cumsum()
4
----> 5 df.plot_bokeh(rangetool=True)
~/anaconda3/envs/E1lib/python3.7/site-packages/pandas_bokeh/plot.py in call(self, *args, **kwargs)
1735
1736     def call(self, *args, **kwargs):
-> 1737         return plot(self.df, *args, **kwargs)
1738
1739     @property
~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in plot(df_in, x, y, kind, figsize, use_index, title, legend, logx, logy, xlabel, ylabel, xticks, yticks, xlim, ylim, fontsize, color, colormap, category, histogram_type, stacked, weights, bins, normed, cumulative, show_average, plot_data_points, plot_data_points_size, number_format, disable_scientific_axes, show_figure, return_html, panning, zooming, toolbar_location, hovertool, hovertool_string, vertical_xlabel, webgl, **kwargs)
477             hovertool_string,
478             number_format,
--> 479             **kwargs
480         )
481
~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in lineplot(p, source, data_cols, colormap, hovertool, xlabelname, x_axis_type, plot_data_points, plot_data_points_size, hovertool_string, number_format, **kwargs)
1013         hovertool_string=hovertool_string,
1014         number_format=number_format,
-> 1015         **kwargs
1016     )
1017
~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in _base_lineplot(linetype, p, source, data_cols, colormap, hovertool, xlabelname, x_axis_type, plot_data_points, plot_data_points_size, hovertool_string, number_format, **kwargs)
951             source=source,
952             color=color,
--> 953             **kwargs
954         )
955
fakesource in line(self, x, y, **kwargs)
~/anaconda3/envs/E1lib/python3.7/site-packages/bokeh/plotting/helpers.py in func(self, **kwargs)
855             mglyph_ca = None
856
--> 857         glyph = _make_glyph(glyphclass, kwargs, glyph_ca)
858         nsglyph = _make_glyph(glyphclass, kwargs, nsglyph_ca)
859         sglyph = _make_glyph(glyphclass, kwargs, sglyph_ca)
~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/plotting/helpers.py in _make_glyph(glyphclass, kws, extra)
396     kws = kws.copy()
397     kws.update(extra)
--> 398     return glyphclass(**kws)
399
400
~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/model.py in init(self, **kwargs)
305         kwargs.pop("id", None)
306
--> 307         super(Model, self).init(**kwargs)
308         default_theme.apply_to_model(self)
309
~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/core/has_props.py in init(self, **properties)
251
252         for name, value in properties.items():
--> 253             setattr(self, name, value)
254
255     def setattr(self, name, value):
~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/core/has_props.py in setattr(self, name, value)
286
287             raise AttributeError("unexpected attribute '%s' to %s, %s attributes are %s" %
--> 288                 (name, self.class.name, text, nice_join(matches)))
289
290     def str(self):
AttributeError: unexpected attribute 'rangetool' to Line, possible attributes are

js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, subscribed_events, tags, x or y

Hi @Kladderadatasch ,
Thanks for reporting this issue. The reason is that the current documentation already contains features of the next release, which should be out soon. You can install the current dev version, which will be release 0.4 via:
pip install git+https://github.com/PatrikHlobil/Pandas-Bokeh.git

Does it work then?
Best Patrik

Hi @Kladderadatasch ,
Thanks for reporting this issue. The reason is that the current documentation already contains features of the next release, which should be out soon. You can install the current dev version, which will be release 0.4 via:
pip install git+https://github.com/PatrikHlobil/Pandas-Bokeh.git

Hi @PatrikHlobil,
thanks for resolving this issue, indeed now the sample code works
and I could adjust it also to my needs.
However, I've got a follow up issue:
The Rangetool takes automatically the DateTime index and represents it as
a well-formatted date. I.e. 2011/11/24
But if I use your lineplot and with code like
    hovertool_string=r"""
                        <h3> Date: @{TIMESTAMP}</h3>
""",

I'm returned with a Unix timestamp, even the Index is in pandas datetime format.
Is there a way to format this? Here in original bokeh with code like:
    formatters={
        'date'      : 'datetime', # use 'datetime' formatter for 'date' field
    },

I'm wondering how I can make fine adjustments like this for the hover tool and why
the range tool has a different representation.

EDIT:
For the line plots I used
x = 'TIMESTAMP'
because if I set the timestamp here as index,
the datetime of TIMESTAMP is replaced by the row-number in the plot,
giving me a straight linear line.

Hi @Kladderadatasch ,
the simplest solution that comes in my mind is that you define an additional column in your DataFrame, where you convert your timestamps using the simple pandas datetime functionalities in the string format that you wish and then you use this column in the hovertool_string.
Would that suit your needs?
Best,
Patrik

@PatrikHlobil,
that was simple and great help, I'm a bit embaressed having not thought about this myself.
Using the dataframe.dt.strftime('%Y-%m-%d, %H:%M:%S') function, I could display everything beautifully.
Many thanks!

Hi @Kladderadatasch ,
Good to hear that I could help you. I just released version 0.4 on PyPI, so you can now switch to the official version if you want.
Best Patrik

Hi again @PatrikHlobil,
I guess there's a small issue with the PyPi packages.
If you install it via pip, you'll receive version 0.4, but through conda you'll receive version 0.3.
Maybe give that a check ?
Cheers

Hi @Kladderadatasch ,
This is correct. With version 0.4 I have issues converting it to a conda package 😔. However since it is a pure python package, you can savely install it via pip.
Best Patrik


Add os.getlogin patch for module_creator_test

Coverage increased (+0.04%) to 91.135% when pulling 7c1e54cb7a9f676dab8376b889818510200c0957 on mc-test-fix into 235181a1e42a943e7d3bdce849b34acb188f17c2 on master.

@ulrikpedersen These tests failed in my recent branch with OSError: [Errno 25] Inappropriate ioctl for device in os.getlogin() . I reran the successful merge on master and it failed there as well. I'm not sure why this is suddenly happening, but it seems like a good idea to mock out os.getlogin, regardless.

That is a bit strange... The unittest presumably do not care much about the content of the username, right? So you instead of mocking out the test you could probably just catch the exception (OSError) in your main code (not test code), print an exception log message and fill in the username by other means.
There are alternatives to os.getlogin(). From the python manual:

os.getlogin()
Return the name of the user logged in on the controlling terminal of the process. For most purposes, it is more useful to use the environment variable LOGNAME to find out who the user is, or pwd.getpwuid(os.getuid())[0] to get the login name of the process’s real user id.

Try to see if any of these methods works better.

Should we be using LOGNAME rather than USER?

Closing this and making the fix in #43.


safety check for data

If data isn't defined a TypeError is thrown (e.g. the username doesn't exist). Added a check so that the appropriate error is returned instead.

Thanks for catching that!


Faulty Hyperlink to web site using OfficeOpenXml.ExcelHyperLink

Having looked at Doug's sample 'HyperLink.ps1' I found it might be more "excelesk" to use the type OfficeOpenXml.ExcelHyperLink.
With that I created a similar script, but I found that instantiating that type is a bit irritating:

$link=New-Object -TypeName OfficeOpenXml.ExcelHyperLink -ArgumentList ([system.uri]$URL) ; $link.display=$displayname
$link=New-Object -TypeName OfficeOpenXml.ExcelHyperLink -ArgumentList ([system.uri]$URL),$displayname

While the first code works as expected, the second one initializes ReferenceAddress instead of OriginalUri (which is fine for internal addesses like in Examples/HyperLinks/Races.ps1.
Now I wonder whether the second sample really only applies to internal links, or whether I am on the wrong track.
Thanks in advance
Thomas
[Working example below]
remove-item .\test_hyperlink.xlsx -Force
$linkarray=(("http://dougfinke.com/blog","Doug Finke"),("http://blogs.msdn.com/b/powershell/","PowerShell Blog"),("http://blogs.technet.com/b/heyscriptingguy/","Hey, Scripting Guy"))
$al=[System.Collections.ArrayList]@()
foreach($arrayitem in $linkarray){
    $rightlink=New-Object -TypeName OfficeOpenXml.ExcelHyperLink -ArgumentList ([system.uri]$arrayitem[0])
    $rightlink.display=$arrayitem[1]
    $ps=[PSCustomObject]@{
        Link = $rightlink
    }
    $al.add($ps)
}
$al| Export-Excel "test_hyperlink.xlsx" -AutoSize -clearsheet -WorksheetName "Right"
$al.Clear()
foreach($arrayitem in $linkarray){
    $wronglink=New-Object -TypeName OfficeOpenXml.ExcelHyperLink -ArgumentList ([system.uri]$arrayitem[0]),$arrayitem[1]
    $ps=[PSCustomObject]@{
        Link = $wronglink
    }
    $al.add($ps)
}
$al| Export-Excel "test_hyperlink.xlsx" -AutoSize -Show -clearsheet -WorksheetName "Wrong"

Thanks, Doug. As I wrote, I could sail around this issue.


Zoom in Page Flip

Hi i'm a newbie with open gl. I use your example and want to zoom with two fingers a picture. I have add in code ScaleGestureDetector and Listener. Where should i change scale ? Thanks.

OpenGL use bitmap as texture to draw screen. For zoom in/out, you can do:

Zoom your bitmap which is used as texture to draw screen
Set the zoomed bitmap as texture of OpenGL, e.g:

page.setFirstTexture(mBitmap);

Call drawPageFrame() of PageFlip class to draw bitmap on screen

Hope it can help you.

Big thanks!

Hi @eschao
i'm a newbie with open gl and Android as well. I use your example and want to zoom with two fingers a picture. Sorry i can not understand what you have explained in your answer for implementing Zoom functionality and i know it's not a proper way to asking for detail help but i have spent more than 3 days but nothing working for me can you please guide me in detail that how can i achieve this functionality. Thanks in advance.

OpenGL use bitmap as texture to draw screen. For zoom in/out, you can do:

Zoom your bitmap which is used as texture to draw screen
Set the zoomed bitmap as texture of OpenGL, e.g:

page.setFirstTexture(mBitmap);

Call drawPageFrame() of PageFlip class to draw bitmap on screen

Hope it can help you.

public void changeBitmap(final Bitmap bitmap){
    final Page page = mPageFlip.getFirstPage();
  ///  if (!page.isFirstTextureSet()) {
        drawPage(mPageNo);
        page.setFirstTexture(bitmap);
   // }

    mPageFlip.drawPageFrame();

}

// Not Working


Doesn't work in Opera

Before anyone says "this project only works in Chrome", I know this. However, these days, Opera is more like a clone of Chrome, with Opera flavoring on top. I can install Chrome Extensions (and use them!) in Opera.
I also do all my web development in Opera, before moving on to other browsers for fixes, if necessary. I just want to know if I can get annyang to work, it seems like a really great tool for a project I have.

annyang is "Opera ready" :)
Unfortunately Opera still doesn't support the Web Speech API Specification. Hopefully this will change soon, as other browsers are slowly catching up. It looks like there's a lot of work by the Firefox team to add this soon, and hopefully Opera will follow.
To summarize, annyang is written to the Web Speech API Spec, and any browser that implements it will work with annyang. annyang even has specific provisions for opera prefixes (https://github.com/TalAter/annyang/blob/master/annyang.js#L28) ... the ball is in their court.

Smh, terrible. Thanks for the info!

Why does the website say:
"annyang plays nicely with all browsers, progressively enhancing browsers that support SpeechRecognition, while leaving users with older browsers unaffected.""
When it doesn't ?

Can you explain why you say it doesn't?


TypeError: Cannot read property 'toLocaleLowerCase' of undefined  (since 1.9.4)

Do you read the FAQ?

[X] Yes.
[ ] I am going to read now.

Describe the bug
Since version 1.9.4, the extension throws and error everytime you try to do something with it. If I rollback to 1.9.3 it works as expected.
To Reproduce
Steps to reproduce the behavior:

Install v1.9.4
Go to a existing config (or create a new one) and do any of the Sync actions. You can also go to the Remote Explorer sidebar button and no config will show up.
See error prompt on the lower right corner.

Expected behavior
Should work as on previous versions.
Screenshots
I compared the 'extension.js' file after formatting it between 1.9.3 and 1.9.4 and the problem seems to be here:

In version 1.9.3 the extension didn't use the function that now is failing.
Desktop (please complete the following information):

OS: Linux (Fedora 29)
VSCode Version: 1.31.1
Extension Version: 1.9.4

Extension Logs from Startup - required

Open User Settings.

On Windows/Linux - File > Preferences > Settings
On macOS - Code > Preferences > Settings

Set sftp.debug to true and reload vscode.

Reproduce the problem, get the logs from View > Output > sftp.

[debug] register command "Config" from "./commandConfig.ts"
[debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[debug] register command "Set Profile" from "./commandSetProfile.ts"
[debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[debug] register command "Diff" from "./fileCommandDiff.ts"
[debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[debug] register command "Download" from "./fileCommandDownload.ts"
[debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[debug] register command "List" from "./fileCommandList.ts"
[debug] register command "List All" from "./fileCommandListAll.ts"
[debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[debug] register command "Upload" from "./fileCommandUpload.ts"
[debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[info] config at /home/rixzz/Documents/Git/@RA/REDACTED {"remotePath":"/home/pi/Git/REDACTED/","uploadOnSave":true,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"sftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"RPI - Git/REDACTED","host":"rpi","username":"******","agent":"$SSH_AUTH_SOCK","syncOption":{"delete":true}}
[trace] run command 'Sync Local To Remote'
[error] TypeError: Cannot read property 'toLocaleLowerCase' of undefined
	at module.exports.C.h.config.forEach.e (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:70:61534)
	at l.forEach (<anonymous>)
	at /home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:70:61500
	at C (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:70:61612)
	at module.exports.t.default.getConfig (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:70:64116)
	at Object.u [as handleCtxFromUri] (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:41708)
	at module.exports.t.createFileCommand.<anonymous> (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:4045)
	at Generator.next (<anonymous>)
	at module.exports.r (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:3325)
	at new Promise (<anonymous>)
	at module.exports.r (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:3102)
	at module.exports.t.createFileCommand.doCommandRun.a.map.t (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:3987)
	at Array.map (<anonymous>)
	at module.exports.t.createFileCommand.<anonymous> (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:3980)
	at Generator.next (<anonymous>)
	at s (/home/rixzz/.vscode/extensions/liximomo.sftp-1.9.4/dist/extension.js:1:3158) ```

Fix in v1.9.5


Added capability for keyboard rotation, increased some values.

Thanks! In the long run I think we'll actually be increasing the subdivision substantially, but for the time being it can be whatever.


Fix initial empty network dashboard

Fix default time period to 1 hour relative  instead of fixed time period in the past to prevent an initial empty dashboard

See discord chat here for a full description of the problem and the journey it took for a solution:
https://discord.com/channels/578992315641626624/620633143002660874/870971195816812614

thanks @quasarati !


[PRO-817][PRO-856] Add TDD

https://linear.app/replay/issue/PRO-817/3-extend-swe-agent-to-support-test-driven-development
✅ Final spot check here: https://linear.app/replay/issue/PRO-817/3-extend-swe-agent-to-support-test-driven-development#comment-9cc479fb

@toshok

phew, a lot in here. Left a few questions/requests, but 1 general request: I'd love the "why" comments that you annotated in the PR to be comments in the code when they relate to commented-out code (e.g. https://github.com/replayio/SWE-agent/pull/6/files#r1754582721). Either that, or just remove the commented lines entirely.

I tried adding a few comments, but I don't think its a good idea:

Adding comments on why some line of code was changed injects history of the code into the code itself, which feels like a bad idea.
Adding comments on why some line of code was changed is confusing to anyone who does not know what the original code looked like.
Comments on why some line of code was changed is not easily distinguishable from comments that explain how the code works.


Add personal information in AboutUs.md

Looks good to merge.

Codecov Report
Base: 72.15% // Head: 72.15% // No change to project coverage :thumbsup:

Coverage data is based on head (827f883) compared to base (bda0751).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #39   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


delay at start where activations are not caught

Sometimes there seems to be a little delay at the start when activations are not caught by the agent for some reason. Affects the standard agent.

Seems to happen when turning wskdebug on and off again, leading to action restoring and cold starts. Maybe because wskdebug polling and (web) action invocation around the same time lead to two separate containers spun up?

Moved to https://github.com/apache/openwhisk-wskdebug/issues/6


Module/package

It seems that we need syntax for module or package declaration to define objects and types inside it, like mentioned in #22.
E.g.:
module org.eolang:
    object if as If:
        #...

@g4s8 I would rather require an explicit definition of the package/module in the object name, where and when necessary. For example, this one will put object if into org.eolang:
object org.eolang.if as If:
  # ...

While this code will leave it outside of any package/module:
object if as If:
  # ...

WDYT?

@yegor256, explicit definition looks good, cause we always can use import org.eolang.if in client code, right?
But I missed the point of "outside of any package/module" in second example. Do you mean that this if will be in some default package or some anonymous package (different for each object, declared without package)?
And what about access controll? Would an object be allowed to access any object/type in other packages?

@g4s8 yes, we will use import in client's code.
Maybe I'm wrong, but I thought that we should have an ability to skip packaging and declare objects in "default" package, as you called it. Just like you can do it in Java, if you don't use package at all. I'm not sure, maybe it's not a good idea though. Maybe we should be more strict and always require a package.
I think that any object should be allowed to access any package/object. This package-only access rights, which are offered in Java, are just a mess, I believe.

@g4s8 now it works like this:
+package org.example

[args...] > main
  stdout
    "Hello, world!"

@g4s8 now it works like this:
+package org.example

[args...] > main
  stdout
    "Hello, world!"


I have a error when running video_gradcam_demo.py

When I trying running video_gradcam_demo.py have an error:
pidzvnese@piii-pc:~/Desktop/code/face_classification/src$ python3 image_gradcam_demo.py
Using TensorFlow backend.
Traceback (most recent call last):
File "image_gradcam_demo.py", line 22, in
image_path = sys.argv[1]
IndexError: list index out of range
Can you help me solve it?

i have same issue. kindly, have you gotten a solution?

@pidzvnese using the image path  of the picture you will like to detect will solve this problem.
example : image_path = "C:\Users\Kasutaja\Pictures\barack.img"


Dragonrage: Watch differentwordsotherlanguages.xyz

Dragonrage requests the watch of the watch_keyword differentwordsotherlanguages\.xyz. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

differentwordsotherlanguages\.xyz has been seen in 2 true positives, 0 false positives, and 0 NAAs.

Approved by cigien in Charcoal HQ


OnUserUpdateOccured - Username Not Populated

When logging inside a handler for the OnUserUpdateOccured event, the username field of the ChatUserEventModel class is not populated.

So, there's both a bug and not a bug in this.
The bug is that the event doesn't have an "id" field, but instead has a "user" field which contains the user's ID. I made a quick update for this that simply created a wrapper "user" field which assigns and pulls from the ID field to keep simplicity.
The fact that a username is not returned is actually by-design for the Mixer APIs, it will only return what's actually changed about the user. In the case of a user being modded for example, only the roles of the user changed, so only their ID and their new roles set will be returned. If they changed their username, then their name would be included in the packet.
For your bot, I'd suggest simply calling the user's API on the channel to get their new information when this event is returned, as it won't always be consistent with what the event actually "means" when it gets fired.


Can we use l2 weight decay with Lasagne?

Yes, implement your own lasagne.objectives.Objective class that overrides method get_loss to add the regularization term.  Something like this should work (untested):
    def get_loss(self, input=None, target=None, *args, **kwargs):
        network_output = self.input_layer.get_output(input, *args, **kwargs)
        if target is None:
            target = self.target_var

        reg = lasagne.regularization.l2(network_output)
        return self.loss_function(network_output, target) + reg * 0.0001

Then pass your class as the objective parameter into NeuralNet.
Feel free to reopen if this doesn't work.

    class MyObjective(Objective):
       def get_loss(self, input=None, target=None, *args, **kwargs):
            network_output = self.input_layer.get_output(input, *args, **kwargs)
            if target is None:
                target = self.target_var

            reg = lasagne.regularization.l2(network_output)
            return self.loss_function(network_output, target) + reg * 0.01

Use the above code and it led to the following error:
      File "benchmark.py", line 165, in <module>
        net.fit(train,labels)
      File "/home/slhome/admin/cnx/local/lib/python2.7/site-packages/nolearn/lasagne.py", line 263, in fit
        self.initialize()
      File "/home/slhome/admin/cnx/local/lib/python2.7/site-packages/nolearn/lasagne.py", line 162, in initialize
        self.y_tensor_type,
      File "/home/slhome/admin/cnx/local/lib/python2.7/site-packages/nolearn/lasagne.py", line 218, in _create_iter_funcs
        loss_train = obj.get_loss(X_batch, y_batch)
      File "benchmark.py", line 114, in get_loss
        reg = lasagne.regularization.l2(network_output)
      File "/home/slhome/admin/cnx/src/lasagne/lasagne/regularization.py", line 10, in l2
        all_params = layers.get_all_non_bias_params(layer)
      File "/home/slhome/admin/cnx/src/lasagne/lasagne/layers/helper.py", line 218, in get_all_non_bias_params
        all_params = get_all_params(layer)
      File "/home/slhome/admin/cnx/src/lasagne/lasagne/layers/helper.py", line 154, in get_all_params
        params = sum([l.get_params() for l in layers], [])
    AttributeError: 'TensorVariable' object has no attribute 'get_params'

Woops, try passing self.input_layer into lasagne.regularization.l2 instead.

Finally solved this problem after reading code in Lasagne:
class MyObjective(Objective):
    def get_loss(self, input=None, target=None, aggregation=None, **kwargs):
        """
        Get loss scalar expression

        :parameters:
            - input : (default `None`) an expression that results in the
                input data that is passed to the network
            - target : (default `None`) an expression that results in the
                desired output that the network is being trained to generate
                given the input
            - aggregation : None to use the value passed to the
                constructor or a value to override it
            - kwargs : additional keyword arguments passed to `input_layer`'s
                `get_output` method

        :returns:
            - output : loss expressions
        """
        network_output = self.input_layer.get_output(input, **kwargs)
        if target is None:
            target = self.target_var
        if aggregation not in self._valid_aggregation:
            raise ValueError('aggregation must be \'mean\', \'sum\', '
                             'or None, not {0}'.format(aggregation))
        if aggregation is None:
            aggregation = self.aggregation

        losses = self.loss_function(network_output, target)
        reg = lasagne.regularization.l2(self.input_layer)
        losses=losses+reg*0.01

        if aggregation is None or aggregation == 'mean':
            return losses.mean()
        elif aggregation == 'sum':
            return losses.sum()
        else:
            raise RuntimeError('This should have been caught earlier')

I'm not sure whether I use the right version of Lasagne. But it seems to work.

@bobchennan Yours is right.  My code was based on an outdated version that didn't have the aggregation bit.
Though I guess it could be done with a little less writing by calling the base class method first.  What if you try this:
class MyObjective(Objective):
    def get_loss(self, input=None, target=None, **kwargs):
        loss = super(MyObjective, self).get_loss(input=input, target=target, **kwargs)
        reg = lasagne.regularization.l2(self.input_layer)
        return loss + reg * 0.01

That's fine. I just copied the code from lasagne.
Now I use the following code:
class MyObjective(Objective):
def get_loss(self, input=None, target=None, **kwargs):
loss = super(MyObjective, self).get_loss(input=input,
target=target, deterministic=False, **kwargs)
if not deterministic:
return loss + 0.01 * lasagne.regularization.l2(self.input_layer)
else:
return loss
It gives the actual value of loss function on the cross-validation data.
2015-03-29 23:01 GMT+08:00 Daniel Nouri<EMAIL_ADDRESS>
@bobchennan https://github.com/bobchennan Yours is right. My code was
based on an outdated version that didn't have the aggregation bit.
Though I guess it could be done with a little less writing by calling the
base class method first. What if you try this:
class MyObjective(Objective):
def get_loss(self, input=None, target=None, **kwargs):
loss = super(MyObjective, self).get_loss(input=input, target=target, **kwargs)
reg = lasagne.regularization.l2(self.input_layer)
return loss + reg * 0.01
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-87425976.

That's fine. I just copied the code from lasagne.
Now I use the following code:
class MyObjective(Objective):
    def get_loss(self, input=None, target=None, deterministic=False, **kwargs):
        loss = super(MyObjective, self).get_loss(input=input,
target=target, deterministic, **kwargs)
        if not deterministic:
            return loss + 0.01 * lasagne.regularization.l2(self.input_layer)
        else:
            return loss

It gives the actual value of loss function on the cross-validation data.

Thanks for that.  This should be useful for folks wanting to do the same thing.  I noticed your line 4 has a syntax error though ("non-keyword arg after keyword arg"), and it should be:
class MyObjective(Objective):
    def get_loss(self, input=None, target=None, deterministic=False, **kwargs):
        loss = super(MyObjective, self).get_loss(input=input,
target=target, deterministic=deterministic, **kwargs)
        if not deterministic:
            return loss + 0.01 * lasagne.regularization.l2(self.input_layer)
        else:
            return loss

Hopefully we finally nailed it.  :-)
Except a more sophisticated version might turn the magic 0.01 into a parameter of __init__.  An exercise for the reader...

@dnouri may I ask what is probably a simple question? How does this function get used? Does something in nolearn need to also get adjusted? I tried to run nolearn / lasagne after simply running this function but it didnt seem to have any effect.

Also curious, to which layer is this regularization applied?

@BrianMiner
make sure that you use the lastest version of NoLearn/Lasagne.
Pass this class to the parameter 'Objective'

Got it, thanks for this great library!
On 04/13/2015 11:51 PM, cnx wrote:

@BrianMiner https://github.com/BrianMiner
make sure that you use the lastest version of NoLearn/Lasagne.
Pass this class to the parameter 'Objective'
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-92590274.

@bobchennan, thanx  a lot. I am wondering how can i tune this regularisation function. I ve been working on 0.01 magic number. Is it the only param i can change? I ve tried multiple values but didn't get any benefit.

I think you can change the equation. For example, maybe you can set up
different value for different layers after carefully code reading.
2015-04-30 20:31 GMT+08:00 valerioorfano<EMAIL_ADDRESS>
@bobchennan https://github.com/bobchennan, thanx a lot. I am wondering
how can i tune this regularisation function. I ve been working on 0.01
magic number. Is it the only param i can change? I ve tried multiple values
but didn't get any benefit.
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-97754131.

I' ve tried the following code:
class MyObjective(Objective):
def init(self, mn = 0.01):
self.magicnum = mn
def get_loss(self, input=None, target=None, deterministic=False, **kwargs):
loss = super(MyObjective, self).get_loss(input=input,target=target, deterministic=deterministic, **kwargs)
if not deterministic:
return loss + self.magicnum * lasagne.regularization.l2(self.input_layer)
else:
return loss
and then called NeuralNet with following parameter:
             hidden1_objective = MyObjective(0.01),
             hidden2_objective = MyObjective(0.1),
             hidden3_objective = MyObjective(0.05)

I get the error:
TypeError: init() got an unexpected keyword argument 'objective'

instead of

hidden1_objective = MyObjective(0.01),
hidden2_objective = MyObjective(0.1),
hidden3_objective = MyObjective(0.05)

try
Objective=Myobjective

different weight can be specified in function get_loss
2015-04-30 21:23 GMT+08:00 valerioorfano<EMAIL_ADDRESS>
I' ve tried the following code:
class MyObjective(Objective):
def init(self, mn = 0.01):
self.magicnum = mn
def get_loss(self, input=None, target=None, deterministic=False, *
*kwargs): loss = super(MyObjective,
self).get_loss(input=input,target=target, deterministic=deterministic, **
kwargs)
if not deterministic:
return loss + self.magicnum * lasagne.regularization.l2(self.input_layer)
else:
return loss
and then called NeuralNet with following parameter:
         hidden1_objective = MyObjective(0.01),
         hidden2_objective = MyObjective(0.1),
         hidden3_objective = MyObjective(0.05)

I get the error:
TypeError: init() got an unexpected keyword argument 'objective'
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-97780533.

Hi i m not sure i got you, sorry. How can i get different weights for layer?
Regards Valerio
Il giorno 30/apr/2015, alle ore 15:37, "cnx"<EMAIL_ADDRESS>ha scritto:

instead of

hidden1_objective = MyObjective(0.01),
hidden2_objective = MyObjective(0.1),
hidden3_objective = MyObjective(0.05)

try
Objective=Myobjective

different weight can be specified in function get_loss
2015-04-30 21:23 GMT+08:00 valerioorfano<EMAIL_ADDRESS>
I' ve tried the following code:
class MyObjective(Objective):
def init(self, mn = 0.01):
self.magicnum = mn
def get_loss(self, input=None, target=None, deterministic=False, *
*kwargs): loss = super(MyObjective,
self).get_loss(input=input,target=target, deterministic=deterministic, **
kwargs)
if not deterministic:
return loss + self.magicnum * lasagne.regularization.l2(self.input_layer)
else:
return loss
and then called NeuralNet with following parameter:
hidden1_objective = MyObjective(0.01),
hidden2_objective = MyObjective(0.1),
hidden3_objective = MyObjective(0.05)
I get the error:
TypeError: init() got an unexpected keyword argument 'objective'
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-97780533.

—
Reply to this email directly or view it on GitHub.

Hack the code in lasagne.regularization.l2(self.input_layer),
classified these weights by their layer and multiply with different weights
2015-04-30 21:59 GMT+08:00 valerioorfano<EMAIL_ADDRESS>
Hi i m not sure i got you, sorry. How can i get different weights for
layer?
Regards Valerio
Il giorno 30/apr/2015, alle ore 15:37, "cnx"<EMAIL_ADDRESS>ha scritto:

instead of

hidden1_objective = MyObjective(0.01),
hidden2_objective = MyObjective(0.1),
hidden3_objective = MyObjective(0.05)

try
Objective=Myobjective

different weight can be specified in function get_loss
2015-04-30 21:23 GMT+08:00 valerioorfano<EMAIL_ADDRESS>
I' ve tried the following code:
class MyObjective(Objective):
def init(self, mn = 0.01):
self.magicnum = mn
def get_loss(self, input=None, target=None, deterministic=False, *
*kwargs): loss = super(MyObjective,
self).get_loss(input=input,target=target, deterministic=deterministic,
**
kwargs)
if not deterministic:
return loss + self.magicnum *
lasagne.regularization.l2(self.input_layer)
else:
return loss
and then called NeuralNet with following parameter:
hidden1_objective = MyObjective(0.01),
hidden2_objective = MyObjective(0.1),
hidden3_objective = MyObjective(0.05)
I get the error:
TypeError: init() got an unexpected keyword argument 'objective'
—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-97780533.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/dnouri/nolearn/issues/62#issuecomment-97804108.

Hi and Thanx. I've used the belowe code, with different weight for each hidden layer, but still doesn't seem to give benefit.
def get_loss(self, input=None, target=None, deterministic=False, **kwargs):
loss = super(MyObjective, self).get_loss(input=input,target=target, deterministic=deterministic, **kwargs)
all_layers = get_all_layers(input_layers)
hidden_layers = all_layers[1:-1]
if not deterministic:
for i,h_layer in enumerate(hiddenlayers):
zeros = np.zeros(i).astype(int).astype(str)
denom = '10' +  ''.join(zeros)
loss = loss + i/float(denom) * lasagne.regularization.l2(h_layer)
return loss
else:
return loss

Sorry, but we've had to update objective again.  See here for an example of using the new objective function to add losses together from multiple different network outputs: https://github.com/dnouri/nolearn/issues/105#issuecomment-121915528
And here for the default implementation of the new objective: https://github.com/dnouri/nolearn/pull/124#issue-95185140


Unit Test

In this PR my partner and I :

Wrote unit tests for all classes.
Wrote unit tests for all decorator classes too.

thank you so much


auth: Add Sign in with Apple support. (Browser flow)

This implementation overrides some of PSA's internal backend
functions to handle state value with redis as the standard
way doesn't work because of apple sending required details
in the form of POST request.
Includes a mixin test class that'll be useful for testing
Native auth flow.
Testing Plan:
Automated tests and manual testing of webflow to check if everything works well
CI: https://circleci.com/gh/chdinesh1089/zulip
GIFs or Screenshots:

I added the decode_id_token method and fixed up mainly some comments and tests. This should be ready for a review I think

This is great.  I'm merging with a large amount of changes, essentially rewritten all of the comments and documentation to be clearer and more concise (something that I do for a lot of PRs; user-facing documentation is really hard to do well!).  Thanks @chdinesh1089!
Merged as dc90d54b085cc33f29c7de5dcea576987e4d92cd.  I'd appreciate your reviewing that final version and including commits to fix any typos or other mistakes in the main PR with the native flow.
Thanks everyone!