dev: scale-codec in blockifier & starknet-api main

Since https://github.com/keep-starknet-strange/madara/pull/1407 we are able to execute std only code in the runtime. Meaning we are losing the use of our blockifier/starknet-api/cairo-vm forks.
Still, we cannot use the libs directly yet, because we need a lot of the types defined there to implement parity-scale-codec::{Encode, Decode}.
Those impl are already done in our branches on our forks, but we need them on upstream/main now.
That is the purpose of this issue: open PR to the upstream repos, where you add a parity-scale-codec feature and impl/derive the trait (mostly copy-paste from our branch) on every type defined there.

@tdelabro I can take this one

I believe this issue is an important prerequisite for upgrading the Cairo and RPC versions. I'd like to know how much work is left to complete. Do we need more people to speed things up?

It most likely will stay in our forks for a bit more. But most types have proper impl at this point

repository archived in favor of https://github.com/madara-alliance/madara


Add CNEO/CGAS deposits

Missing: statically declare the contracts we will be using in order to avoid having to pay extra 500 GAS on deployment.
Right now this contract needs to be deployed with the "dynamic call" option activated.

Merged into #12


A New Search Bar Feature in the Mobile Platform

There should be a filter bar in the Home Screen>Issues or in other things like Pull requests or any other in the mobile platform like the web platform.

Still isn't there.


changed a few existing color tokens and added dark mode color tokens

To fix:

in color-text ? One token is standout-strong-active  and the other standout-strong active ; they cannot have the same name but more importantly, they cannot have spaces in their names.


convertFromRaw requires at least one block

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
convertFromRaw({
  "blocks": [],
  "entityMap": []
})

Running the above code throws a new exception in 0.10.5 because the duck-typing for tree nodes assumes there is at least one block. Previously, convertFromRaw would not throw an error and just return an empty content state.
What is the expected behavior?
The current functionality might be expected behavior but it seems odd that it throws because of a feature flag.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
0.10.5 (It looks like it was first introduced in 93df36d1cd2799)

Has there been any update on this?

is there any progress on this issue?

This should be fixed, since the check no longer assumes there's at least one block.
Before:
https://github.com/facebook/draft-js/blob/07eb9c4e2e2771d284c3c8f0c0d78d6b488619fd/src/model/encoding/convertFromRawToDraftState.js#L217
Now:
https://github.com/facebook/draft-js/blob/db3216d9e2b35d976be5a56c69e680f7dcf714e1/src/model/encoding/convertFromRawToDraftState.js#L216-L218


Social network broken?

Discussing the migration to Discourse with Jason, we realize that the social network -- as it is computed now -- cannot be recovered from the thread structure in Discourse. From what I understand -- hopefully I am wrong -- in Discourse all comments are comments to the initial post and no information is stored as whether a comment is a comment to a previous comment.
A direct consequence of this is that the social interaction we may infer is a clique indicating a bunch of people were involved in a same thread -- so the overall social network would be obtained by aggregating all these cliques. This would produce a radically different structure that the one we are looking at now.
Of course, this is only hypothetical since we have not yet seen any Discourse data.I guess you guys are preparing views that can be used from graph-ryder.
?

Not only that: we are porting the entire OpenEthno dataset, and porting
OpenEthno itself onto Discourse. Should be another week before we give you
access to the new APIs.
On Thu, Aug 31, 2017 at 2:15 PM, guywiz<EMAIL_ADDRESS>wrote:

Assigned #27
https://github.com/opencarecc/graph-ryder-dashboard/issues/27 to
@albertocottica https://github.com/albertocottica.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/opencarecc/graph-ryder-dashboard/issues/27#event-1229422667,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB4p5sf1BJOc9u5J6LSYuSpZ3mgQHkzuks5sdqPIgaJpZM4PIuQ3
.

Closing: APIs fully operational.


feat: Home feed reordering (v2)

The type of this PR is: Enhancement

This PR resolves CX-1812
Description
Note: Reverts artsy/eigen#5447

PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have tested my changes on iOS and Android.
[x] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[x] I have added a feature flag, or my changes don't require a feature flag. (How do I add one?)
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a changelog entry below or my changes do not require one.

Changelog updates
Changelog updates

Cross-platform user-facing changes

Home feed reordering - rajsam003

iOS user-facing changes

Android user-facing changes

Dev changes

This PR contains the following changes:

Cross-platform user-facing changes (Home feed reordering - rajsam003)

  Generated by :no_entry_sign: dangerJS against 767ea3457768aa7828b18646c618217420138d0a


Add missing parameter and add a dependency on OctopusTools

Thanks for your feedback Kenneth. Regarding solutions with mixed packages, I have not seen or worked on any such solutions before. From what I know of the projects you are working on, this is also not something for which you have a current need (YAGNI). As you know, the convention defined by the PowerTasks package is to have a single application or library per solution, where the PowerTasks package is installed into the "main" project in the solution. By definition, this would only output a normal NuGet package, or an Octopus package, but not both.
I've given it some more thought and I now remember that the omission of dependencies in the nuspec files was not because of the package being a solution-level package. It was purely because initially, PowerTasks (previously psakify) was a monolithic package that contained the scripts for all the bundled tasks, and because consumers of the package would not always require all the functionality, we didn't want to require the installation of supporting NuGet packages that would never be used. Now that the bundled tasks are being delivered as plugin packages, it makes sense to add the dependencies to the respective plugin NuGet packages' nuspec files.
However, if we do this for the Test plugin, then we would be forcing the consumer to install Machine.Specifications.Runner.Console, NUnit.Runners, SpecFlow and Chutzpah. Additionally, we would have to bundle the BrowserStackLocal.exe which is likely to become outdated pretty quickly. Also, who are we to assume that all consumers of the Test plugin are going to want to use BrowserStack for their SpecFlow tests? On top of this, due to our recent collaboration on a shared project I know first hand that the Test plugin is no longer working as-is for that project due to custom requirements. These facts lead me to conclude that we were overly optimistic in thinking that we could write a "one size fits all" test plugin for PowerTasks, as we quickly outgrew the supported functionality it provided and now use a customised test task in the consuming project.
The current state of the Test plugin is a bit of a mess (no offense), with an implicit dependency on the Compile plugin, and is therfore a prime candidate for refactoring (or preferably outright deprecation). In order to achieve loose coupling and high cohesion, the plugins should all be very focused and adhere to SRP. This will enable a modular design that is easily pluggable and suitable for a wide audience.
Your concern about calling pt test, instead of pt unittest, jstest, acceptancetest is valid, but due to the flexibility of Invoke-Build it can easily be achieved by using compostion, through defining top-level tasks in the consuming project such as this:
task Test UnitTest, JsTest, AcceptanceTest

task ci Clean, Version, Compile, Test, Pack, Push

task dev Clean, Compile, Test

I propose that we split out the various test types into separate, highly cohesive plugins, each doing only one thing. These should have very specific names, such as MSpec, NUnit, SpecFlow, Chutzpah, etc. thus leaving room for a possbile future xUnit one (and others). Once that is done, then we can add the relevant dependencies to the respective plugins' nuspec files. I don't expect you to do that as part of this pull request, but I think it would be wise to update this pull request to separate the Push part out and use the provided Push plugin instead. Then in line with what I've said above, the OctoPack plugin can have a dependency on the OctopusTools NuGet package.
I'll create an issue detailing the problem and proposed solution for refactoring/deprecating the Test plugin as outlined above.
I look forward to your response.

Sorry for the delay. I've now removed the Push part of this plug-in.


Added test Augmented Reality.

Everything inside zxing package is copy&paste.
Everything in camera package edited by me.

@NoiseDoll I've found this https://github.com/journeyapps/zxing-android-embedded/blob/master/README.md and tried adding dependencies on these libaries on this branch https://github.com/matobet/moVirt/tree/zxing-camera Could you please try it and see if this proper gradle dependency would eliminate at least part of the manual copy & paste? Thanks!

has been merged as a different pull request


Stylesheet grows on every request when SSR with Apollo

When using apollo & styled-components together in SSR there is an issue where the stylesheet of styled-components keep growing for every request and every component that is rendered on the server will keep being served to every other request after that (even if the component is not on the page of that request).
Environment
System:

OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 242.20 MB / 16.00 GB
Shell: 5.3 - /bin/zsh

Binaries:

Node: 10.0.0 - /usr/local/bin/node
Yarn: 1.6.0 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman

Reproduction
https://github.com/rovansteen/styled-components-apollo-ssr
This example is a small reproduction of the issue. This is a combination of the next.js examples of apollo & styled-components.
I added two pages /foo & /bar. The first one has a red box, the latter a blue one. When you first server render the /foo route, you get the following server side rendered stylesheet:
<style data-styled-components="jyimBH">
/* sc-component-id: foo__Box-dflpa2-0 */
.foo__Box-dflpa2-0 {} .jyimBH{background:red;}
</style>

That's all fine and exactly as you expect, but now if you render /bar you get this stylesheet:
<style data-styled-components="jyimBH hhmlmC">
/* sc-component-id: foo__Box-dflpa2-0 */
.foo__Box-dflpa2-0 {} .jyimBH{background:red;}
/* sc-component-id: bar__Box-sc-6q2tw8-0 */
.bar__Box-sc-6q2tw8-0 {} .hhmlmC{background:blue;}</style>

Now the styles from the /foo page get included on the request for /bar. You can imagine that if you have a big website with lots of different pages this can quickly add up and start making the site really slow after a while.
I have narrowed the problem down to the getDataFromTree method that Apollo uses to figure out which data needs to be fetched. If you comment out this part the server rendered stylesheets do not leak.
There is this comment in the example that might explain the issue:
      if (!process.browser) {
        // getDataFromTree does not call componentWillUnmount
        // head side effect therefore need to be cleared manually
        Head.rewind();
      }

Perhaps it has something to do with componentWillUnmount not being called? Although that seems obvious on the server. I looked for some way to "rewind" or reset the stylesheet but I could not find any.
Hope this reproduction and explanation makes it clear the issue I'm facing 🙌🏼

@rovansteen can you call collect styles after getDataFromTree but before renderToString?

@probablyup it doesn't look like next.js allows me to pass anything down from _document.js (where I need all this to happen so I can put the style tags in the head) and _app.js where Apollo does it's thing.
I'm a little bit confused, why do styles leak if collectStyles is active for both the renders? It seemed to me that this could be an issue if you do not wrap collectStyles outside both the getDataFromTree and the regular render, but now everything should be captured and cleaned up right?

Still thinking/looking into this. I don't think you're doing anything wrong and it matches the implementation from the official example exactly. That example doesn't have much content in it though so it's possible the implementation is too minimal to see it's set up wrong.
But it could also be something on our side. Just haven't dug enough yet.
I can say that I've used styled-components successfully with that apollo method though, so I know it's workable.

@rovansteen Still not sure, but interestingly the bug isn't present in the v4 beta. 🤷♂

@rovansteen Might want to check out the new v3 version I just published. There was an important streaming fix in there that I wouldn't be surprised if it was related to the issue you're seeing

@probablyup I tried the new v3 but same issue. I updated the repo if you want to try it out yourself. I can confirm that the v4 beta does not have the issue interestingly enough. Looks like it's stable enough to use it in the project where I was experiencing this issue.
Do you want to keep this issue open for further investigation or do you want to close it?

Let's just go ahead and close it. v3 had a much more complicated flow for acquiring stylesheets and I probably won't have time to go through and debug it more thoroughly. Glad v4 is working as expected.


Framebuffer per application

Is your feature request related to a problem? Please describe.
Currently, oxide has to save the screen for every application after freezing them, and then recall it before resuming. This adds some latency, as well as odd timing issues like #105
Describe the solution you'd like
Every application should have their own framebuffer, and tarnish should handle determining which frame buffer should be drawn to the screen. This would also allow for notification display to be handled better as you can ignore portions of the application framebuffer and composite in the notification area.
Additional context
https://github.com/ddvk/remarkable2-framebuffer/issues/4#issuecomment-726063096

Is it currently possible to make oxide run on remarkable2 (using remarkable2-framebuffer)?

Since I don't have an rM2 I can't answer that. I've heard that it kind of works though from @raisjn

Tried myself - It launched. Touch input didn't work obviously. Stylus input worked for the top bar, I was not able to launch Xochitl nor Process Manager though.

@Witos A better place for this conversation would be in #48


Add easy way to use gradle-managed node / npm binaries outside the gradle build.

First of all, thanks so much for this plugin. It has helped me greatly in the past week.
One thing that seems to be a bit of a pain for developers used to using node / npm tasks directly is that it is hard to invoke the same versions of node / npm used in the gradle build outside of gradle.
There are probably a few different ways to solve this, but I thought these two were worth consideration:

Have the nodeSetup task create some links / shell scripts in the root of the project that can tie back to the appropriate node binaries in ~/.gradle/nodejs (or where ever they have that configured in the node {} closure).
Delegate the management of node binaries to a tool that already does that well (https://github.com/creationix/nvm)

Some updates to the nodew wrapper script (thanks @dougborg):
#!/usr/bin/env bash
# https://github.com/srs/gradle-node-plugin/issues/24

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
NODEJS=$DIR/build/gradle/nodejs

platform=$(uname -s | tr '[:upper:]' '[:lower:]')

typeset -A arches=([x86_64]=x64 [x86]=x86) # not sure about the x86
arch=$(uname -m | tr '[:upper:]' '[:lower:]') # doesn't match directly
nodearch=${arches[$arch]}

# All of these may be overridden by the calling environment if needed.
NODE_VERSION=${NODE_VERSION:-0.12.2}
NODE_HOME="${NODE_HOME:-$NODEJS/node-v${NODE_VERSION}-${platform}-${nodearch}}"
NPM_HOME="${NPM_HOME:-${NODE_HOME}/lib/node_modules/npm/bin/}"
NODE_MODULES_HOME="${NODE_MODULES_HOME:-./node_modules/.bin}"

PATH="${NODE_MODULES_HOME}:${NPM_HOME}:${NODE_HOME}/bin:${PATH}"

exec "${@}"

Modifications:

added an associative array lookup for the platform (the wildcard wasn't working for me)
modified NODE_HOME to point to the project directory by figuring out the directory of the nodew script
fixed NPM_HOME which was always pointing to NODE_HOME
fixed PATH to include the bin directory of NODE_HOME
added quoting in case the project directory contains spaces (not tested)
added an exec to replace the nodew script process rather than creating a child process

I managed to get @rocketraman's script working on my machine with some minor tweaks. Here's my take on this script:
#!/usr/bin/env bash
# https://github.com/srs/gradle-node-plugin/issues/24

GRADLE_USER_HOME="${GRADLE_USER_HOME:-${HOME}/.gradle}"
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# This should match the "workDir" setting in build.gradle
NODEJS=$GRADLE_USER_HOME/nodejs

platform=$(uname -s | tr '[:upper:]' '[:lower:]')

arch=$(uname -m | tr '[:upper:]' '[:lower:]')
case $arch in
x86_64)
    nodearch=x64
    ;;
x86)
    nodearch=x86
    ;;
esac

# All of these may be overridden by the calling environment if needed.
NODE_VERSION=${NODE_VERSION:-0.12.2}
NODE_HOME="${NODE_HOME:-$NODEJS/node-v${NODE_VERSION}-${platform}-${nodearch}}"
NPM_HOME="${NPM_HOME:-${NODE_HOME}/lib/node_modules/npm}"
NODE_MODULES_HOME="${NODE_MODULES_HOME:-$DIR/node_modules}"

PATH="${NODE_MODULES_HOME}/.bin:${NPM_HOME}/bin:${NODE_HOME}/bin:${PATH}"

exec "${@}"

Modifications:

Now computes NODEJS from GRADLE_USER_HOME (which is ~/.gradle by default) instead of DIR. I don't know why my machine is different, but $DIR/build/gradle/nodejs didn't exist for me.
Replaced the arches variable with a case statement. The typeset -A switch appears to be an addition in Bash 4.x and breaks on Bash 3.x. Unfortunately Bash 3.x is the default version for OSX Mavericks and Yosemite so -A will break the script for a lot of users

not sure what the default version of Bash is on El Capitan, but knowing Apple I wouldn't be surprised if they haven't updated it.

Bash scripting isn't my forte, so apologies if I did anything weird/uncouth. Thanks all for putting this together!

I was looking for windows wrapper scripts and I can't find anything.
If somebody needs also windows wrapper. Try my scripts (easy but working):
nodew.cmd (windows)
@echo off
setlocal
set NODE_EXE=""
for /r %%x in (*node.exe) do set NODE_EXE=%%x
set NODE_HOME=%NODE_EXE:node.exe=%
set PATH=%NODE_HOME%;%PATH%
if not exist %NODE_EXE% (
  echo Node not found! Run gradle build first!
) else (
  %NODE_EXE% %*
)
@echo on

yarn.cmd (windows)
@echo off
setlocal
set YARN_SCRIPT=%~dp0build\yarn\node_modules\yarn\bin\yarn.js
if not exist %YARN_SCRIPT% (
  echo Node not found! Run gradle build first!
) else (
  nodew.cmd %YARN_SCRIPT% %*
)
@echo on

nodew (linux)
@echo off
setlocal
set YARN_SCRIPT=%~dp0build\yarn\node_modules\yarn\bin\yarn.js
if not exist %YARN_SCRIPT% (
  echo Node not found! Run gradle build first!
) else (
  nodew.cmd %YARN_SCRIPT% %*
)
@echo on

yarnw (linux)
#!/usr/bin/env bash

YARN_SCRIPT="./build/yarn/node_modules/yarn/bin/yarn.js"

if [ ! -f $YARN_SCRIPT ]; then
    echo "Yarn not found! Run gradle build first!"
else
    ./nodew $YARN_SCRIPT "$@"
fi

Instead of having to determine the arch and using it to get the path to node, here's a  node script that leverages how nodeSetup outputs the node path:
#!/usr/bin/env bash
# https://github.com/srs/gradle-node-plugin/issues/24
set -Eeuo pipefail

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
GRADLEW="$DIR/gradlew"
# This should match the "workDir" setting in build.gradle
PROJECTDIR="${DIR}/"

NODE_HOME="$("$GRADLEW" -q -p "$PROJECTDIR" nodeSetup)/bin"
PATH="${NODE_HOME}:${PATH}"
exec "${NODE_HOME}/node" "$@"


"/me gives" is not recognized

Catbase probably sees it in a different form that the IRC weirdo thing. (Or it might not see it at all, given that it seemingly can't send them.)

An inventory system does not exist right yet, should be a pretty simple addition to write once the other stuff is taken care of. I'd think just some table that tracks item and owner ought to be enough.

Oh hey, this is a duplicate of #2.


change default shell to fish

Hi :D i want to change my default shell to fish, i used chsh command as root and as my user,with and without -s flag, it just doesn't work(i tried logging out and restarting after that, and it doesn't work too)! $SHELL is always equal to /usr/bin/zsh. and nothing changes it. i also checked /etc/passwd file and my user's shell is set to fish there, but i always get zsh after opening a new terminal,

Take a look at ~/.profile

Take a look at ~/.profile

Thanks! Solved the problem.


SAMZA-2562: [Scala cleanup] Clean up Scala in samza-kv-inmemory and samza-kv-couchbase

Issues:

samza-kv-couchbase uses the Scala Gradle plugin but does not have Scala code
samza-kv-inmemory is in Scala, but we are no longer using Scala in Samza, so it would be good to move to Java.
samza-kv-inmemory is missing unit tests

Changes:

Rewrite samza-kv-inmemoryin Java (no functional changes)
Remove usage of Scala Gradle plugin for samza-kv-couchbase and samza-kv-inmemory
Add unit tests for InMemoryKeyValueStore in samza-kv-inmemory.

Tests:

Added unit tests for original Scala version of InMemoryKeyValueStore and verified that they passed.
Tests pass for new Java version of InMemoryKeyValueStore.
./gradlew build (some of the tests in samza-test use InMemoryKeyValueStore).

API changes: I don't think the InMemoryKeyValueStore is part of the Samza API, since InMemoryKeyValueStorageEngineFactory is supposed to be used, but the InMemoryKeyValueStore constructor did change from having one KeyValueStoreMetrics argument with a default value of new KeyValueStoreMetrics to having a required KeyValueStoreMetrics argument. I believe this only applies to Scala usage of InMemoryKeyValueStore, since Java usage requires all arguments (even ones with default values) to be passed anyways.
Upgrade/usage instructions: If using the InMemoryKeyValueStore constructor in another Scala class, then add the KeyValueStoreMetrics argument. It's unlikely that anyone is depending on this constructor explicitly.
Notes:
While writing the unit tests, I found a couple of bugs: https://issues.apache.org/jira/browse/SAMZA-2563 (InMemoryKeyValueStore double counts deletes in metrics) and https://issues.apache.org/jira/browse/SAMZA-2564 (InMemoryKeyValueStore.snapshot does not satisfy immutability API). I did not include fixes in this PR, since I want to keep the Scala refactoring separate from any functional changes.
This PR is not intended to have any functional changes.

@bkonold Could you please review?


Migrate Datastore, Pub/Sub, Storage, and Core tests to use AssertJ

This contributes to the goal of enabling AssertJ checkstyle in #1203.
I will split the migration in to a few PRs since it will touch a lot of files.

Codecov Report

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

@@            Coverage Diff            @@
##             master    #1324   +/-   ##
=========================================
  Coverage     67.72%   67.72%
  Complexity     1397     1397
=========================================
  Files           202      202
  Lines          5643     5643
  Branches        567      567
=========================================
  Hits           3822     3822
  Misses         1587     1587
  Partials        234      234

Flag
Coverage Δ
Complexity Δ

#integration
79.47% <ø> (ø)
1697 <ø> (ø)
:arrow_down:

#unittests
67.72% <ø> (ø)
1397 <ø> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Add VAT fields to public omis endpoints

So that the frontend can show them in the invoice

Codecov Report

Merging #671 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #671   +/-   ##
========================================
  Coverage    96.53%   96.53%
========================================
  Files          128      128
  Lines         3952     3952
  Branches       341      341
========================================
  Hits          3815     3815
  Misses          96       96
  Partials        41       41

Impacted Files
Coverage Δ

datahub/omis/order/serializers.py
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Is there something wrong in the calculating of the TransE loss in function ssaga_model.forward_kg()?

In function ssaga_model.forward_kg(), neg_losses = self.define_loss([t, t_neg]), what does this mean? Since the pos_loss in the last line is -(h + r -t), should this be calculated as self.define_loss([t_neg, projected_t]), equal to -(h + r - t_neg)? And the target in self.criterion_KG should be set as 1 rather than -1 to make the pos_loss is greater than the neg_loss. Maybe I misunderstood something, could the authors give some detailed explanations, thanks very much!

Hi Rongchuan,
  The define_loss function computes the distance: |t - (h+r)|, where for true triples, the smaller the value, the better, and for negative samples vice versa.  Therefore in the margin loss part,  we set -1 to make those true triples have smaller distances than those negative samples.

Thanks for your reply. I've got it. I got the sign wrong before. But I still have another question. You seem to try to pull h + r close to t and push t_neg far away from t. But in TransE, we usually push h + r away from t_neg. This two ways seem to be equivalent but I wonder if there additional benefit in choosing the first way, lol...😄

Hi Rongchuan,
In TransE we try to use the marginal loss that takes the input of positive scores and negative scores. You can find the similar reference code here : https://github.com/DeepGraphLearning/KnowledgeGraphEmbedding

OK, thanks for that~


Plugin.MediaManager.ExoPlayer.GetSource() uses FileDataSourceFactory for http/https urls

Plugin.MediaManager.ExoPlayer.GetSource() uses FileDataSourceFactory for http/https urls instead of HttpSourceFactory. This is caused because the encoded url ("http%3A%2F%2F") is passed to URLUtil.IsHttpUrl() which looks for "http://" (likewise for https).
This issue was discussed here https://github.com/martijn00/XamarinMediaManager/issues/212 and here https://github.com/martijn00/XamarinMediaManager/pull/213.

While trying to fix ExoPlayer.GetSource(), I ran into a problem.
To test, I modified XamarinMediaManager-develop\Samples\Forms\Droid to use ExoPlayer by adding a reference to Plugin.MediaManager.ExoPlayer and adding the following code to MainActivity.cs:
            Plugin.MediaManager.MediaManagerImplementation current
                = Plugin.MediaManager.CrossMediaManager.Current as Plugin.MediaManager.MediaManagerImplementation;

            var exoPlayer
                = new Plugin.MediaManager.ExoPlayer.ExoPlayerAudioImplementation(current.MediaSessionManager);

            Plugin.MediaManager.CrossMediaManager.Current.AudioPlayer
                = exoPlayer;

The audio plays but the app throws the following exception and aborts once you acknowledge the exception in Visual Studio.
System.NotSupportedException: Unable to activate instance of type Com.Google.Android.Exoplayer2.Trackselection.TrackSelections from native handle 0xbec40210 (key_handle 0x724232c).

Am I missing some other references?

ExoPlayer 2 is being added for the v1.0 release.  I believe only ExoPlayer 1 is partially supported currently.


Update cv25519 decrypt function

1st step to fix cv25519 decryption.
Now the code doesn't return CX_INVALID_CURVE anymore.
Remaining an issue show on the PC side:
gpg: public key is 551E384EA3608B44
gpg: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg: waiting for the agent to come up ... (5s)
gpg: connection to agent established
gpg: using subkey 551E384EA3608B44 instead of primary key BA8BF32C7557C015
gpg: pinentry launched (46842 gnome3 1.1.1 /dev/pts/2 xterm-256color :0 20620/1000/5 1000/1000 -)
gpg: ecdh failed in gcry_cipher_decrypt: Checksum error
gpg: using subkey 551E384EA3608B44 instead of primary key BA8BF32C7557C015
gpg: encrypted with 255-bit ECDH key, ID 551E384EA3608B44, created 2024-03-15
      "testkey"
gpg: public key decryption failed: Checksum error
gpg: decryption failed: No secret key
Decryption error!

Checklist

[X] App update process has been followed
[X] Target branch is develop
[ ] Application version has been bumped

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

Project coverage is 27.01%. Comparing base (400ff19) to head (5690ed2).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #103   +/-   ##
========================================
  Coverage    27.01%   27.01%
========================================
  Files            1        1
  Lines          211      211
========================================
  Hits            57       57
  Misses         154      154

Flag
Coverage Δ

unittests
27.01% <ø> (ø)

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

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


Fix scoring bug in get_summary_df

Fixes #791, correcting the computation of time to target on val (s) when scoring submissions.

Ah ops, yeah, it was left from some test that I ran, now it should be gone!


Parsing arguments passed to debug providers

VSCode Version: 1.25.2
OS Version: 10.13.5

We can pass custom arguments in our debug providers' configurations, e.g.:
args: [`--extensionDevelopmentPath=${rootPath}`]

For some reason the following isn't properly parsed:
args: [`--extensionDevelopmentPath="${rootPath}"`]
args: [`--extensionDevelopmentPath='${rootPath}'`]

Notice that I'm quoting the value of the extensionDevelopmentPath option.
Is this documented anywhere? Is this a bug?

What do you mean by "the following isn't properly parsed"?
What error are you seeing?
Instead of putting quotes around the rootPath to protect paths with spaces, you can let VS Code do the work:

args: [`--extensionDevelopmentPath`, `${rootPath}`]

VS Code will quote arguments that contain spaces.

What do you mean by "the following isn't properly parsed"?

I get this error, basically the quotation marks are preserved and a slash is added at the beginning:

args: [--extensionDevelopmentPath, ${rootPath}]
VS Code will quote arguments that contain spaces.

That's exactly what I need, thanks.
Does VS Code quote arguments that are write like this: --extensionDevelopmentPath=${rootPath} too?


SW-5559 Add store for user deliverable categories

Add a store class to read and write the sets of deliverable categories assigned
to users.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#2117
#2116  👈
#2115
#2114
main

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

Join @sgrimm and the rest of your teammates on  Graphite

Merge activity

Jun 28, 2:23 PM EDT: @sgrimm started a stack merge that includes this pull request via Graphite.


Unable to import YAML Swagger definitions using "Custom::ApiImport" property "apiDefinition"

Hi again this is more of a feature request rather than an issue but was wondering if it would be possible for "Custom::ApiImport" to have a parameter similar to the "AWS::ApiGateway::RestApi" property "BodyS3Location" which would enable YAML Swagger definitions to be imported.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
At the moment I can't see how YAML can be imported using the "Custom::ApiImport" property "apiDefinition". Have tried parsing the multi-line YAML into single-line every which way but keep getting "Invalid Swagger 2.0 input" errors. Please forgive my ignorance on how to do this, I'm still relatively new to AWS Cloudformation.
Thanks and regards,
Adrian Wong

Hi, I think you are correct and this is something that is missing. I'll try
to add it as soon as possible but please feel free to create a pull request
if you have time :)
On Fri, Jul 15, 2016, 07:45 adrianwong81<EMAIL_ADDRESS>wrote:

Hi again this is more of a feature request rather than an issue but was
wondering if it would be possible for "Custom::ApiImport" to have a
parameter similar to the "AWS::ApiGateway::RestApi" property
"BodyS3Location" which would enable YAML Swagger definitions to be imported.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
At the moment I can't see how YAML can be imported using the
"Custom::ApiImport" property "apiDefinition". Have tried parsing the
multi-line YAML into single-line every which way but keep getting "Invalid
Swagger 2.0 input" errors. Please forgive my ignorance on how to do this,
I'm still relatively new to AWS Cloudformation.
Thanks and regards,
Adrian Wong
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/carlnordenfelt/aws-api-gateway-for-cloudformation/issues/48,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEzRoWEcJrcsxSlo6jVW77Yf0sCy_pbDks5qVx5ggaJpZM4JNGK0
.

Hi,
sorry about the delay.
Can you try updating your installation to this version: https://s3.amazonaws.com/apigatewaycloudformation.eu-west-1/test/1/ApiGatewayCloudFormation.template (note that this version is only available in eu-west-1).
Updated schema for ApiImport can be found here: https://github.com/carlnordenfelt/aws-api-gateway-for-cloudformation/blob/issue-48-import-api-from-s3/lib/service/json-schemas/api-import-schema.json
Let me know how it works. If you are happy with it I'll release it.


[Improve] Speed up ClickhouseFile Local generate a mmap  object

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
[ ] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

[ ] Update the release-note.

Thanks @viverlxl ! Please enable the test case run on your fork repository. You can follow the guide.

Thanks @viverlxl ! Please enable the test case run on your fork repository. You can follow the guide.
Done

Please add some empty commit to retrigger CI.

Also I think you should add comment for other better know this PR doing what, and the reason of why we should add this PR?

Also I think you should add comment for other better know this PR doing what, and the reason of why we should add this PR?
done


Scheduled Message groups.

Groups of messages (could be stored in shared subfolder per-group? OR make a "message_text" subfolder and then the scheduling is done in its own json file in the parent directory, in which case the messages in the group are specified in the parent json).
Allows random selection (or cycling) of one or more messages in the group to be played at intervals.

resolved by #5


About jaeger-ingester zipkin to es accumulation

Describe the bug
Regarding the accumulation of jaeger-ingester zipkin to es, our data in zipkin is directly transferred to kafka, and part of it is from jaeger-agent to jaeger-collector to jaeger-ingester; however, the accumulation of kafka in ziplin
To Reproduce
Steps to reproduce the behavior:

ziplin->kafka->jaeger-ingester accumulation
agent->collector->ingester no accumulation

Expected behavior
How can we not accumulate? In the process, it was discovered that the consumer group would not actively consume data even when Kafka accumulates.
Screenshots

Version (please complete the following information):

OS: centos7
Jaeger version: 1.26
docker image: wangpukinds/jager-ingester:1.0

This is no longer supported without using Otel somewhere in the mix, please re-open based on how you are instrumenting the code.


Initial greenhouse UI

Hi @mklewandowski , this is a pretty large PR, which I apologize for. There wasn't an easy way to break up the work.
The vast majority of changes are repetitions on the same theme, and can probably just be skimmed in the Files Changed view:

Remove code that assumed something about the mouse layout, and make it a per-unit function that gets called from unit.ts
Create a custom unit stylesheet, and add the unit name to the top-level container

For number 1 above, sometimes views call units.ts directly, and sometimes through the backpack-mouse model, in particular for all the images (views used to call organism.baseImage, but now there is a wide variety of images they request). The annoying thing is that the logic for what image is shown when is totally different for mice vs peas, so we need a lot of custom image calls, many of which return the same image, but different sets return different "same images" for different species.

I don't know that any of these should slow down this PR, but here are a few things I noticed when running (some of these we saw yesterday so I know you're aware of them, but I'll mention them just in case they were worked on and we expect them to be fixed).  These could all probably be fixed in subsequent PRs.
Scroll offset:

Label vertical position:

Button label:

Legend color:

Fixed the linting errors, thanks. Yes, I didn't include the UI fixes in this PR, because basically, that's how it got so big: it's never done till it's done. I figured they'd go into the next.


[Spanner] WITH clause is not recognized as query command type

The Cloud Spanner SQL dialect allows queries to start with either SELECT or WITH. The latter is currently not recognized as a keyword indicating the start of a SELECT command in the client library.
See https://cloud.google.com/spanner/docs/query-syntax for full query syntax reference.

I suspect this is what needs changing: https://github.com/googleapis/google-cloud-dotnet/blob/master/apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data/SpannerCommandTextBuilder.cs

I suspect this is what needs changing: https://github.com/googleapis/google-cloud-dotnet/blob/master/apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data/SpannerCommandTextBuilder.cs

I suspect this is what needs changing: https://github.com/googleapis/google-cloud-dotnet/blob/master/apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data/SpannerCommandTextBuilder.cs

Yes, I already have a fix, I'm just adding a number of test cases for other types of commands as well.
On the same note: The current implementation also does not work if the user has specified statement hints and/or comments. That seems to me like a lot less of a problem, but still not 100% correct in this case.

I suspect this is what needs changing: https://github.com/googleapis/google-cloud-dotnet/blob/master/apis/Google.Cloud.Spanner.Data/Google.Cloud.Spanner.Data/SpannerCommandTextBuilder.cs

Yes, I already have a fix, I'm just adding a number of test cases for other types of commands as well.
On the same note: The current implementation also does not work if the user has specified statement hints and/or comments. That seems to me like a lot less of a problem, but still not 100% correct in this case.

Right. Happy to see any degree of fix, whether it's a really complete one or a stop-gap.

Right. Happy to see any degree of fix, whether it's a really complete one or a stop-gap.


MultiMC likes to crash

Perhaps wait up to 5 seconds for the multimc window to open, and if failing ask the user if they'd like to do something about it 😳

Thinking about making a fork of Prism Launcher which can handle the launch requests better somehow, perhaps by just launching the instances detached from the launcher so it doesn't care what happens with it

Idea:

Whenever a launch is requested, kill multimc.exe if there is no window
launch multimc.exe, and wait for a multimc window to appear
then start the instance launching
win?


"locale" isn't respected in tsconfig.json

Create a project with a tsconfig.json, write some erroneous code, start compiling in --watch mode, and try changing the locale option around a bit. You'll see that the error messages don't actually get reflected to the currently specified language.
I thought this was a problem with tsconfig.json not getting its settings updated, but it's really just that it's not checked.

--locale is really a function of the process that is doing the compilation, either tsc or tsserver. the locale is loaded once during the process lifetime and is not changed during the execution. in that sense having it in the tsconfig.json is not right.

Pushed https://github.com/SchemaStore/schemastore/pull/362 to remove --locale from tsconfig.json help.

I'm very annoyed with force applying of your localization. I don't want to see any languages without English while at coding. Localized error messages don't have compatibility with non-localized on trouble shooting.

I don't want to see any languages without English while at coding

No one is forcing anything on anybody.. English is the default. I am assuming you are using VSCode, and in this case, it uses your locale for the errors. if you want to opt-out of this behavior set "typescript.locale": "en" in your settings.
//cc @mjbvz


Techdebt: Replace string-format with f-strings (for d* dirs)

See #5579

Codecov Report

Merging #5662 (ba84edc) into master (b0b9439) will decrease coverage by 0.00%.
The diff coverage is 73.33%.

@@            Coverage Diff             @@
##           master    #5662      +/-   ##
==========================================
- Coverage   96.20%   96.19%   -0.01%
==========================================
  Files         743      743
  Lines       72742    72749       +7
==========================================
+ Hits        69979    69984       +5
- Misses       2763     2765       +2

Flag
Coverage Δ

servertests
36.88% <28.88%> (+<0.01%)
:arrow_up:

unittests
96.13% <73.33%> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

moto/dynamodb/comparisons.py
94.91% <0.00%> (ø)

moto/dynamodb/parsing/executors.py
99.26% <ø> (ø)

moto/dynamodb/parsing/tokens.py
100.00% <ø> (ø)

moto/dynamodb/parsing/validators.py
98.52% <ø> (ø)

moto/dynamodb_v20111205/models.py
93.69% <ø> (ø)

moto/datasync/models.py
95.83% <66.66%> (ø)

moto/dynamodb/models/dynamo_type.py
91.83% <66.66%> (ø)

moto/dynamodb/models/__init__.py
93.58% <75.00%> (-0.09%)
:arrow_down:

moto/dynamodb/parsing/expressions.py
96.14% <81.81%> (-0.18%)
:arrow_down:

moto/databrew/exceptions.py
96.66% <100.00%> (ø)

... and 5 more

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


Dynamic views using databinding

Can we create n no of edittext (provided by user) and inflate them in our layout using data binding? If so then how can we create observableFields for those dynamic views?

You can't actually inflate n no of EditText in the xml layout file using databinding, bindings are generated in compile time. My suggestion is use a RecyclerView to show n no of fields or you can programmatically generate the UI if the value of n is small.


Update npm version to add 'addProvider' function

Hi, it seems the npm version is missing the latests commits.
Could you push it so we can use the latest functions with npm ?
I am looking to integrate linkedin with it.
Regards

@auser how about a release soon? Relying on branches/master is not cool. :-)

@0is1, you may roll that commit back now :-) 2.2.0 is in npm and this issue is done.


Typescript in VSC reports error status not in sync with Typescript in project

In a nutshell, Typescript built into VSC should report exactly the same errors in a project as Typescript installed into the project itself. If VSC code editor shows an error with some code (underlining code with red squiggle) then when the project is built on the command line, the same errors should be reported). By the same token, if the project builds ok, then there should be no errors displayed in VSC code editor. I am reporting that my project builds ok but the code editor is reporting an error:
Cannot find module './app.config.xml'.ts(2307)
VSC shows version 3.7.2 of typescript is set (showing in the status bar of VSC), and the version installed into the project is indeed the same version, so there is no mistmatch in Typescript versions.

VSCode Version:

Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:47:44.719Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

OS Version:
macos: 10.14.6 Mojave
Steps to Reproduce:

The problem is this:
I am trying to import an xml file into a typescript testcase using the following TS import
import data from './app.config.xml';
I have a declaration file that declares the *.xml module in a file ./lib/declarations.d.ts which includes:
declare module '*.xml' {
  const content: string;
  export default content;
}

In my tsconfig file I have set "types" as:
    "types": [
      "mocha", "node", "./lib/declarations"
    ],

I build my test project with the following command:
webpack --config webpack.config.test.js
where my webpack.config.test.js is:
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
  devtool: 'source-map',
  mode: 'development',
  entry: ['./tests/all-tests-entry.js', './lib'],
  target: 'node',
  externals: [nodeExternals()],
  module: {
    rules: [
      {
        test: /\.xml$/i,
        use: 'raw-loader'
      },
      { test: /\.ts(x?)$/, loader: 'ts-loader' },
      { test: /\.json$/, loader: 'json-loader' }
    ]
  },
  resolve: {
    extensions: ['.ts', '.js', '.json']
  },
  watchOptions: {
    ignored: /node_modules/
  },
  output: {
    filename: 'test-bundle.js',
    sourceMapFilename: 'test-bundle.js.map',
    path: path.resolve(__dirname, 'dist'),
    libraryTarget: 'commonjs'
  }
};

and ts config is:
{
  "compilerOptions": {
    "allowJs": true,
    "alwaysStrict": true,
    "esModuleInterop": true,
    "module": "commonjs",
    "moduleResolution": "Node",
    "noImplicitAny": true,
    "sourceMap": true,
    "strictNullChecks": true,
    "target": "es5",
    "types": [
      "mocha", "node", "./lib/declarations"
    ],
    "lib": [
      "es5",
      "es2015",
      "es6",
      "dom"
    ]
  },
  "include": [
    "lib/**/*"
  ],
  "exclude": [
    "node_modules",
    "**/*.spec.ts"
  ]
}

I have attached a screenshot of the error in VSC (with all extension disabled) and also of the command line that show that the project builds ok; hence the 2 are out of sync.

I have also attached a zip of a simple project 'import-xml' which exhibits this behaviour, just unzip it, then run npm i on it.
To run the build: "npm run build:t"
import-xml.zip
Then open in VSC on the project and see the error be reported.
I have posted a question on stackoverflow at: StackOverflow question
Does this issue occur when all extensions are disabled?: Yes

This is not a question. I have posted was seems to me like a bug with VSC not being in correct sync as far as Tyescript is concerned.


⚠ Processors has degraded performance

In 4c03b57, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 74 ms

Resolved: Processors performance has improved in d61bd12.


flutter-sdk creates directories and files in ~/

The .dart directory, .dart-tool directory, and .flutter file are dumped in ~/ when running flutter-configure.
The only way I have figured out how to stop flutter from doing this is to set the HOME environment variable.
Just thought you would like to know!

@aduskett These are the magic variables to sandbox:
https://github.com/meta-flutter/meta-flutter/blob/6a2f191dc57067cfe87b1a1505b622295bf66fe7/classes/flutter-app.inc#L79-L80
I use them in workspace-automation to sandbox the environment:
https://github.com/meta-flutter/workspace-automation/blob/079c2f52ed977d7fbbafebbd925628d1477980a3/flutter_workspace.py#L259-L269

Thank you, @jwinarske ! That's very helpful!

@jwinarske After setting the above, the same directories and files are made in ~/. Setting the HOME variable is the only way I have found so far to prevent the files and directories from every being put in ~/ in the first place.

@aduskett Are you setting both variables to desired path?
export PUB_CACHE=<my sandbox pub cache>
export XDG_CONFIG_HOME=<my sandbox .config>

dart looks for PUB_CACHE, among others.
flutter tooling looks for XDG_CONFIG_HOME, before using HOME
With above environmental variable being set what are you seeing?

Closing as there is no clear repro


not able to parse css having contains pseudo

Hi,
It would be much appreciated if contains pseudo support provided.
example -
div:contains('foo bar')
a:contains('$ Per Price')
Thanks

I think the issue is actually the parser doesn't support quoted strings in pseudo class functions. div:contains(foo) works but div:contains("foo") doesn't.


Example of "audio recognition" trained in tf-1.15.0 isn't able to recognize sound "Yes" on SparkFun Edge development board.

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no.
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.
TensorFlow installed from (source or binary):
Created a docker container from docker image: tensorflow/tensorflow:1.15.0-gpu-py3-jupyter.
Inside the container, got tensorflow source tree through the following steps:

mkdir tensorflow
cd tensorflow
git init
git remote add origin https://github.com/tensorflow/tensorflow.git
git ls-remote --tags origin | grep 1.15.0
38ea9bbfea423eb968fcc70bc454471277c9537c	refs/tags/v1.15.0
git pull origin refs/tags/v1.15.0

TensorFlow version (use command below): v1.15.0.
Python version: 3.6.8.
Bazel version (if compiling from source): neither installed nor used.
GCC/Compiler version (if compiling from source): gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1).
CUDA/cuDNN version:  compute capability: 5.2.
GPU model and memory: GeForce GTX 960.

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
v1.15.0-rc3-22-g590d6ee 1.15.0
Describe the current behavior
Going through the following steps (for all the steps in details, please see Code to reproduce the issue ), SparkFun Edge board was be flashed successfully. But it wasn't able to recognize the sound “Yes” :-(
Describe the expected behavior
If flashing the board with the binary tf model that tf source tree brings, the sound “Yes” was recognized perfectly.
Could you let us know the exact environment and procedure that your tiny_conv_simple_features_model_data.cc was generated in?
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
1, Training model (refer to Training model on your local machine).
1.1, In the same container that we got in “System information”.
1.2,
python tensorflow/tensorflow/examples/speech_commands/train.py \
--model_architecture=tiny_conv --window_stride=20 --preprocess=micro \
--wanted_words="yes,no" --silence_percentage=25 --unknown_percentage=25 \
--quantize=1 --verbosity=INFO --how_many_training_steps="15000,3000" \
--learning_rate="0.001,0.0001" --summaries_dir=/tmp/retrain_logs \
--data_dir=/tmp/speech_dataset –train_dir=/tmp/speech_commands_train

The training reached ~90%  accuracy, see 191028.log as attached.
1.3,
python tensorflow/tensorflow/examples/speech_commands/freeze.py \
--model_architecture=tiny_conv --window_stride=20 --preprocess=micro \
--wanted_words="yes,no" --quantize=1 --output_file=/tmp/tiny_conv.pb \
--start_checkpoint=/tmp/speech_commands_train/tiny_conv.ckpt-18000

1.4,
toco \
--graph_def_file=/tmp/tiny_conv.pb --output_file=/tmp/tiny_conv.tflite \
--input_shapes=1,49,40,1 --input_arrays=Reshape_2 --output_arrays='labels_softmax' \
--inference_type=QUANTIZED_UINT8 --mean_values=0 --std_dev_values=9.8077

1.5,
xxd -i /tmp/tiny_conv.tflite > /tmp/tiny_conv_micro_features_model_data.cc

1.6,
Modified the binary model file to tiny_conv_micro_features_model_data.new.cc as attached, put it into tensorflow/lite/experimental/micro/examples/micro_speech/micro_features
2, Flashed the model, (refer to Deploy to SparkFun Edge).
2.1,
make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=sparkfun_edge TAGS="CMSIS" micro_speech_bin

2.2,
cp tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info0.py \
tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info.py

2.3,
python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_image_blob.py \
--bin tensorflow/lite/experimental/micro/tools/make/gen/sparkfun_edge_cortex-m4/bin/micro_speech.bin \
--load-address 0xC000 \
--magic-num 0xCB \
-o main_nonsecure_ota \
--version 0x0

2.4,
python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_wireupdate_blob.py \
--load-address 0x20000 \
--bin main_nonsecure_ota.bin \
-i 6 \
-o main_nonsecure_wire \
--options 0x1

2.5,
Walked through AI on a microcontroller with TensorFlow Lite and SparkFun Edge, flashed our program and bootloader into the board.
Test it then.
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

3. More results that I have dug out until Oct 31, 2019.
3.1,
As reported at 1.2, we got a model whose accuracy reached ~ 90%. But, after freezing, its “predictions” on many “Yes” sample wavs are always 33% (see
191031v2.log).
3.2,
If I just ran your example for Training by "copy/paste", the accuracy is < 10%! (see
191031v3.log. (Could you let me know why?)
3.3,
Also on your guidance Use your local machine, you wrote:
"You must currently use the TensorFlow Nightly pip package. This version is confirmed to work:"
tf-nightly-gpu==1.15.0.dev20190729

However, train.py still was failed when I ran the commands as below.
pip3 list | grep tensorflow
tensorflow-estimator 1.15.1
tensorflow-gpu       1.15.0

pip3 install tf-nightly-gpu==1.15.0.dev20190729
Collecting tf-nightly-gpu==1.15.0.dev20190729
  Using cached https://files.pythonhosted.org/packages/c6/ed/6cc1a8a764c046cd102ec58904c32eebaa1360efe858796c97645f63401e/tf_nightly_gpu-1.15.0.dev20190729-cp36-cp36m-manylinux1_x86_64.whl
......
Successfully installed tf-nightly-gpu-1.15.0.dev20190729

python tensorflow/tensorflow/examples/speech_commands/train.py \
> --model_architecture=tiny_conv --window_stride=20 --preprocess=micro \
> --wanted_words="yes,no" --silence_percentage=25 --unknown_percentage=25 \
> --quantize=1 --verbosity=INFO --how_many_training_steps="15000,3000" \
> --learning_rate="0.001,0.0001" --summaries_dir=/tmp/retrain_logs \
> --data_dir=/tmp/speech_dataset –train_dir=/tmp/speech_commands_train
Traceback (most recent call last):
  File "tensorflow/tensorflow/examples/speech_commands/train.py", line 81, in <module>
    import input_data
......
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/canned/dnn.py", line 23, in <module>
    from tensorflow.python.feature_column import dense_features
ImportError: cannot import name 'dense_features'

Could you let us know the environments that you confirmed the train.py could work with? And we would continue to work for you on this issue if you need.

The key problem of this issue is here --
The doc of Simple Audio Recognition guides:
"
To begin the training process, go to the TensorFlow source tree and run:
...
python tensorflow/examples/speech_commands/train.py
...
After a few hours of training (depending on your machine's speed) ... you should see an accuracy of between 85% and 90%.
"
But the accuracy that I got with my reproduction is 33% or < 10%  (see my commits 3.1 and 3.2 as above).
I believe that the command got success some times ago.
It will be very appreciated if you could let us know the environment (or configuration) that you had made the command succeed in with? You just need to let us know which commit needs to be restored from repository, then we could reproduce your success of the training.
Many thanks again.

Sorry you're having trouble reproducing our results.  @dansitu can help with the details of the exact configuration we used in our tutorial.  I've also downloaded the model file you supplied and will see if I get any better results.  Maybe @dansitu can also comment on the accuracy that should be expected when running this code on a sparkfun board with our demo code.  The accuracy number quoted is the accuracy expected from the training code.

4, A model was created.
Thanks for @rockyrhodes taking care of the issue and @dansitu handling it.
With surfing internet and my trials, the example model of "speech recognition",
trained by tensorflow/examples/speech_commands/train.py, can reach accuracy ~ 90%.
But, if running the model on on SparkFun Edge board (e.g., a word "Yes"), the confidence score is far lower than the score that the existing binary model, provided by the commit,  provides.
What is key problem for us to train your own "speech recognition" model? According to my experiences, the key problem is to find correct git repository commit.
At the end of this comment, you will learn how to create/train/flash a model based on 2 commits of Tensorflow repository. If "detection_threshold" is set as 150 (the commit provides a binary format model whose "detection_threshold" is 200), the model could recognize almost all "Yes" heard on SparkFun Edge board.
4.1, Setup environment.
How to Train New TensorFlow Lite Micro Speech Models is a good reference.
sudo docker run --runtime=nvidia –name speech-verify -it tensorflow/tensorflow:1.15.0-gpu-py3-jupyter bash
sudo docker container start speech-verify
sudo docker container exec -it speech-verify /bin/bash

Within the container,
apt-get install -y curl zip git xxd

pip3 list | grep tensorflow
tensorflow-estimator 1.15.1
tensorflow-gpu       1.15.0

pip3 install tf-nightly-gpu==1.15.0.dev20190729
pip3 install -I tensorflow_estimator==1.13.0

curl -O -L https://github.com/bazelbuild/bazel/releases/download/0.23.1/bazel-0.23.1-installer-linux-x86_64.sh
chmod +x bazel-0.23.1-installer-linux-x86_64.sh
./bazel-0.23.1-installer-linux-x86_64.sh

Checkout 2 commits from Git repository of Tensorflow:
git clone https://github.com/tensorflow/tensorflow.git

cp -rp  tensorflow  tensorflow-aa47072ff4e2b7735b0e0ef9ef52f68ffbf7ef54
cd  tensorflow-aa47072ff4e2b7735b0e0ef9ef52f68ffbf7ef54
git checkout aa47072ff4e2b7735b0e0ef9ef52f68ffbf7ef54

cd ..
mv tensorflow tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045
cd tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045
git checkout 4a464440b2e8f382f442b6e952d64a56701ab045

yes "" | ./configure

4.2, Training.
Still in the container:
bazel run -c opt --copt=-mavx2 --copt=-mfma tensorflow/examples/speech_commands:train -- --model_architecture=tiny_conv --window_stride=20 --preprocess=micro --wanted_words="yes,no" --silence_percentage=25 --unknown_percentage=25 –quantize=1

bazel run tensorflow/examples/speech_commands:freeze -- --model_architecture=tiny_conv --window_stride=20 --preprocess=micro --wanted_words="yes,no" --quantize=1 --output_file=/tmp/tiny_conv.pb –start_checkpoint=/tmp/speech_commands_train/tiny_conv.ckpt-18000

bazel run tensorflow/lite/toco:toco -- --input_file=/tmp/tiny_conv.pb --output_file=/tmp/tiny_conv.tflite --input_shapes=1,49,40,1 --input_arrays=Reshapexxd -i /tmp/tiny_conv.tflite > /tmp/tiny_conv_micro_features_model_data.cc_1 --output_arrays='labels_softmax' --inference_type=QUANTIZED_UINT8 --mean_values=0 --std_values=9.8077

xxd -i /tmp/tiny_conv.tflite > /tmp/tiny_conv_micro_features_model_data.cc

4.3, Flash.
Continue inside container:
cd ../tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045

Actually the commit provides an existing model that was trained, which is located at: tensorflow/tensorflow/lite/experimental/micro/examples/micro_speech/tiny_conv_micro_features_model_data.cc. Change its name and keep it in case we want to test it as comparison.
Change value of "detection_threshold" to 150 (source file: tensorflow/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/recognize_commands.h).
mv tensorflow/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.cc
tensorflow/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.ori.cc
cp -p  /tmp/tiny_conv_micro_features_model_data.cc tensorflow/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features

make -f tensorflow/lite/experimental/micro/tools/make/Makefile clean

make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=sparkfun_edge TAGS="CMSIS" micro_speech_bin

cp tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info0.py \
tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info.py

python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_image_blob.py \
--bin tensorflow/lite/experimental/micro/tools/make/gen/sparkfun_edge_cortex-m4/bin/micro_speech.bin \
--load-address 0xC000 \
--magic-num 0xCB \
-o main_nonsecure_ota \
--version 0x0

python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_wireupdate_blob.py \
--load-address 0x20000 \
--bin main_nonsecure_ota.bin \
-i 6 \detection_threshold
-o main_nonsecure_wire \
--options 0x1

Following the STEPs, flash the board physically.
4.4, Comparison for 2 test results.
If Reading debug output,we could get 2 test results.
 is the test result originating from running the existing binary model (see 4.3). The test recognizes all sound "Yes" with "detection_threshold=200".
 shows the test based on the model we have just trained. The model recognizes almost all "Yes" but detection_threshold is tuned to a lower value: 150.
4.5, Remaining question.
We have just created a model that could manage to recognize words (e.g., "Yes") as expected. But It is sure that someone had created a working model that can get higher confidence accuracy. How could we reach the "higher confidence accuracy"?

As for my "Remaining question" (see 4.5 above): "How could we reach the 'higher confidence accuracy'?", could you give us some guidance? Thanks!

4.3, Flash (the section needs to be fixed as below)
Prepare the board image to flash, which the trained model is in.
Still in the container, change directory --
cd ../tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045

Actually the commit provides an existing trained model, which is: tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045/tensorflow/lite/experimental/micro/examples/micro_speech/tiny_conv_micro_features_model_data.cc. Change its name as tiny_conv_micro_features_model_data.ori.cc and keep it in case you may need to test it as comparison.
Regarding to the current "confidence score" that can be reached with the 2 commits, I would suggest to change value of "detection_threshold" to 150.
mv tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.cc
tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.ori.cc
cp -p  /tmp/tiny_conv_micro_features_model_data.cc tensorflow/lite/experimental/micro/examples/micro_speech/micro_features

Following "Convert to a C array", copy the head and tail of tensorflow-4a464440b2e8f382f442b6e952d64a56701ab045/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.ori.cc, paste them to tiny_conv_micro_featurestensorflow-4a464440b2e8f382f442b6e952d64a56701ab045/tensorflow/lite/experimental/micro/examples/micro_speech/micro_features/tiny_conv_micro_features_model_data.cc.
Build borad image including the model and all depedencies --
make -f tensorflow/lite/experimental/micro/tools/make/Makefile clean

make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=sparkfun_edge TAGS="CMSIS" micro_speech_bin

cp tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info0.py \
tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/keys_info.py

python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_image_blob.py \
--bin tensorflow/lite/experimental/micro/tools/make/gen/sparkfun_edge_cortex-m4/bin/micro_speech.bin \
--load-address 0xC000 \
--magic-num 0xCB \
-o main_nonsecure_ota \
--version 0x0

python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/create_cust_wireupdate_blob.py \
--load-address 0x20000 \
--bin main_nonsecure_ota.bin \
-i 6 \detection_threshold
-o main_nonsecure_wire \
--options 0x1


RPi4 - "Bad Gateway" on first login

What is troubling you?
First some info about my system:

RPi4 4GB (part of a swarm of 5) running Raspbian Lite which is fully up to date
Currently installed is Docker and docker-compose and I'm running the Portainer service on this machine as well

I'm pretty new to Docker in general, so I figured I would follow the default instructions to start with. I used the exact docker-compose file on this page. The install goes off without a hitch, but the app ends up in an unhealthy state. I did some looking and found bug 483 which is exactly my error as well as several other similar threads posted elsewhere.
I've read through as much as I could, but I can't seem to make any of the suggested compose files work either. They all give me the same errors. From what I can tell, the issue is that the app can't connect to the DB because it's not an ARM version, but I've tried several different mariadb versions as well SQLite (following the instructions on that setup page) that are supposed to be ARM friendly that also don't work.
I guess I'm really just hoping for some guidance here since it doesn't seem like the provided instructions are valid for my set up.
Logs here: _pi_app_1_logs.txt

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

Just gave this a shot. Same deal "Bad Gateway"

I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

Just gave this a shot. Same deal "Bad Gateway"

Im running NPM on a RPI4/8GB and no problems. Use yobasystems/alpine-mariadb:latest as the db image. Make sure your environment has MYSQL_ prefixes instead of MARIADB_ and also change the default passwords.
Launch and use Portainer to check if its running after launch. If not - check the log from Portainer which will show you what error is being thrown.

Im running NPM on a RPI4/8GB and no problems. Use yobasystems/alpine-mariadb:latest as the db image. Make sure your environment has MYSQL_ prefixes instead of MARIADB_ and also change the default passwords.
Launch and use Portainer to check if its running after launch. If not - check the log from Portainer which will show you what error is being thrown.

For some reason, switching to the Latest branch from the Armhf was what did the trick. I already had new passwords and the Mysql prefixes in my file, so that was all that changed. Thanks so much!

For some reason, switching to the Latest branch from the Armhf was what did the trick. I already had new passwords and the Mysql prefixes in my file, so that was all that changed. Thanks so much!

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

How do you do this?

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

How do you do this?

Here's the compose file I used. Replace #PASS# with your passwords
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# Public HTTP Port:
- '80:80'
# Public HTTPS Port:
- '443:443'
# Admin Web Port:
- '81:81'
environment:
# These are the settings to access your db
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "#PASS#"
DB_MYSQL_NAME: "npm"
# If you would rather use Sqlite uncomment this
# and remove all DB_MYSQL_* lines above
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: yobasystems/alpine-mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: '#PASS#'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: '#PASS#'
volumes:
- ./data/mysql:/var/lib/mysql

Here's the compose file I used. Replace #PASS# with your passwords
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# Public HTTP Port:
- '80:80'
# Public HTTPS Port:
- '443:443'
# Admin Web Port:
- '81:81'
environment:
# These are the settings to access your db
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "#PASS#"
DB_MYSQL_NAME: "npm"
# If you would rather use Sqlite uncomment this
# and remove all DB_MYSQL_* lines above
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: yobasystems/alpine-mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: '#PASS#'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: '#PASS#'
volumes:
- ./data/mysql:/var/lib/mysql

I tried this solution but it's still giving me that error on my pi 4

Using yobasystems/alpine-mariadb:latest instead of yobasystems/alpine-mariadb:armhf Worked for me. Thanks


fix(committer): fix ci

This change is

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#351  👈
#154
#167
#160
#156
#140
#133
main-v0.13.2

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

Join @AvivYossef-starkware and the rest of your teammates on  Graphite


Stuck at waiting for application...

Using the latest release, got stuck when start a new trace. Need some insight

Android Studio is closed
Activity Name filled or not filled (same result)

Macbook Pro M1

Thanks for reporting! Was it an app or a plugin? Is application debuggable (or release with rooted device) ?

I also have a similar but not the same situation. In my case, opening the app manually works.
Machine: 2018 Intel MBP
Android App: Debuggable on a non-rooted phone
YAMP: Latest 23.01.17, standalone

Hello, are you using correct main activity name? YAMP just trying to start that activity with ADB command like 'adb shell am start -n yourpackagename/.activityname' . Please try to execute that command in terminal with your package and activity name - will activity start?

Hello, are you using correct main activity name? YAMP just trying to start that activity with ADB command like 'adb shell am start -n yourpackagename/.activityname' . Please try to execute that command in terminal with your package and activity name - will activity start?

You're right, I got the wrong Activity name. Checking the log it was a SecurityExcepiton because exported=false.
Maybe we can have a better error message for this?
Now the issue is shifting, the application opened but I got Cannot find process <package name> message again
Now the log shows this error:
om.github.grishberg.tracerecorder.exceptions.AppTimeoutException: <package_name> not started

You're right, I got the wrong Activity name. Checking the log it was a SecurityExcepiton because exported=false.
Maybe we can have a better error message for this?

Good idea!

Cannot find process

Is the android studio currently running ? Android Studio holds debug port and other applications can't see debug process.
You can use YAMP as the plugin. Thus  YAMP will reuse AS's debug port.


Add Nong Song: OTIS

Song Name
My Ordinary Life
Artist Name
The Living Tombstone
Source
Youtube
Youtube Link
https://www.youtube.com/watch?v=9Zj0JOHJR-s
Direct File Link
No response
Song ID
815246
Start Offset [ms]
13000
Extra
No response

Quick update: The music viideo has some filler effects, ill use the actual music video, so heres an update
{
  "name": "My Ordinary Life",
  "artist": "The Living Tombstone",
  "source": "youtube",
  "startOffset": 0,
  "yt-id": "WuzIw73pmSc",
  "songs": [
    815246
  ]
}

on skub8d8
On Sun, Jul 21, 2024, 04:15 github-actions[bot] @.***>
wrote:

This submission is stale because it has been open for 14 days with no
activity. If it is still relevant, please leave a comment and we will
reopen it.
—
Reply to this email directly, view it on GitHub
https://github.com/FlafyDev/auto-nong-indexes/issues/1024#issuecomment-2241282809,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOC6BSYQ43GRCKB3QWDUXATZNLAPNAVCNFSM6AAAAABKONANBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGI4DEOBQHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

reject
already in the mod


Number Format for currency?

Could someone please point me in the right direction? I'm trying to format a number column to a currency format such as $5.00 instead of just the number 5.
Any help would be greatly appreciated!
Thanks!

@lonnieCross If you just want the formatting, use the excel format code $0.00:
> XLSX.SSF.format('$0.00', 5)
'$5.00'

If you want the thousands separator, the excel format code for that is $#,##0.00:
> XLSX.SSF.format('$#,##0.00', 12345.6789)
'$12,345.68'
> XLSX.SSF.format('$0.00', 12345.6789)
'$12345.68'

If you don't care about the intermediate output and just want to set a cell format to a currency, wipe the cell's formatted text (w property) and override the number format (z property).  Here is a sample nodejs session:
# load XLSX (not required in browser)
> var XLSX = require('xlsx')

# get the workbook (using browser APIs or other commands)
> var wb = XLSX.readFile('n.xlsx')

# show the original sheet
> console.log(XLSX.utils.sheet_to_csv(wb.Sheets.Sheet1))
1,2

# now we want to change the A1 to use a currency format

# first remove the existing formatted text
> var ws = wb.Sheets.Sheet1
> delete ws.A1.w

# now override the cell formatting
> ws.A1.z = '$0.00'

# (optional) if you want to format the cell before proceeding
> XLSX.utils.format_cell(ws.A1) // '$1.00'

# emit CSV again with the currency format (this will automatically reformat cells with no formatted text)
> console.log(XLSX.utils.sheet_to_csv(wb.Sheets.Sheet1))
$1.00,2

I need to export to .xlsx, not a delimited format or JSON, so unfortunately the advice above didn't quite fix my problem.
I developed a workaround for this by manually registering the formats I need on the XLXS.SSF._table:
  _registerNumberFormat: (fmt) ->
      table = XLSX.SSF._table
      empty = null
      i = 0; while not empty and i < 393 # 392 is the last index js-xlsx checks
        preset = table[i]
        if not preset
          empty or= i
        else if preset is fmt
          return
        i++
      if not empty  # This would be strange indeed
        throw new Error 'No more room in the number format table!'
      table[empty] = fmt

@SheetJSDev why not automatically register missing number formats instead of ignoring them?

@tborg FYI you should only write to the table at indices above 164.  From MS-XLS 2.6.165 IFmt:

Custom number format identifiers MUST be greater than or equal to 0x00A4 and less than or equal to 0x0188, and SHOULD be less than or equal to 0x017E.

There are some third-party writers which actually go beyond that point, which is why 0x188 is the end bound and not 0x17E.
In some east asian versions of excel, other indices have implicit meaning.  The full tables are in ECMA-376 section 18.8.30.  For example, code 52 is not included in files, but its implicit meaning depends on locale:

Locale
Format

zh-CN
yyyy"年"m"月"

zh-TW
上午/下午 hh"時"mm"分"

ja-JP
yyyy"年"m"月"

Different versions of excel do different things if you try to override the format.

why not automatically register missing number formats instead of ignoring them?

It's coming, I have some code already but it's not ready for release yet

Great. Thanks for the info.
—
Sent from Mailbox for iPhone
On Fri, Feb 13, 2015 at 6:18 PM, SheetJSDev<EMAIL_ADDRESS>wrote:

@tborg FYI you should only write to the table at indices above 164.  From MS-XLS 2.6.165 IFmt:

Custom number format identifiers MUST be greater than or equal to 0x00A4 and less than or equal to 0x0188, and SHOULD be less than or equal to 0x017E.
There are some third-party writers which actually go beyond that point, which is why 0x188 is the end bound and not 0x17E.
In some east asian versions of excel, other indices have implicit meaning.  The full tables are in ECMA-376 section 18.8.30.  For example, code 52 is not included in files, but its implicit meaning depends on locale:
|Locale|Format|
|------|------|
|zh-CN|yyyy"年"m"月"|
|zh-TW|上午/下午 hh"時"mm"分"|
|ja-JP|yyyy"年"m"月"|
Different versions of excel do different things if you try to override the format.
why not automatically register missing number formats instead of ignoring them?
It's coming, I have some code already but it's not ready for release yet

Reply to this email directly or view it on GitHub:
https://github.com/SheetJS/js-xlsx/issues/158#issuecomment-74357253

To register a custom format before writing to file you should use SSF feature:
XLSX.SSF.load(<your-format>, <index>);

I've used index 164 and it worked.

@SheetJSDev i'm stuck with formatting currencies client side and not in node. can you give me an example?
i create my values the following way:
data[XLSX.utils.encode_cell({c: 0, r: 0})] = {v: 2000, t: 'n'};
i then tried experimenting with the z-property, with no success.
as the original author mentioned z: '0.00%' works

This is now automatically done by the XLSX/XLSB writers.  No need to pre-load, the write process discovers missing formats and populates the table.

@SheetJSDev: is format discovery done by the ODS writer too? I've been adding .z to number cells but nothing was written to the file. All the numbers were output in the "General" format.

how can we specify column as European currency? Like it contains comma instead of decimal.

In general, please raise a new issue.  This issue is nearly 8 years old.
Wrapping up the whole discussion, since there have been developments in the intervening years:
@lonnieCross the formats that Excel recognize as "Currency" are in the table at indices 5-8.  Specifically:
	//  5 -- Currency,   0 decimal, black negative
	5:  '"$"#,##0_);\\("$"#,##0\\)',

	//  6 -- Currency,   0 decimal, red   negative
	6:  '"$"#,##0_);[Red]\\("$"#,##0\\)',

	//  7 -- Currency,   2 decimal, black negative
	7:  '"$"#,##0.00_);\\("$"#,##0.00\\)',

	//  8 -- Currency,   2 decimal, red   negative
	8:  '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',

@tborg @miha-plesko @ngehlert the XLSX and XLS writer now automatically register custom formats if they are not in the table. The manual step is no longer needed.
@dandv preliminary ODS number format parsing is supported.  Some parts like the style-map (a generalized version of Excel conditions) and some format tokens (like "quarters") are not supported
@chanmithra If the format is correct in Excel but not in WPS Office, it is most likely a bug with them -- please raise an issue with them.
@jazib17 Excel localizes number formats by default, so if you use a format like 0.0 it will use your computer decimal and thousands place symbol.