Improvements to interpolation methods

Oh, and I was thinking to myself before whether ~np.isfinite should be used instead of np.isnan to remove infs as well?

To do:

add some tests to the new functions
add other scripts to extrapolate hypsometric bins, especially in the upper part where observations are often missing: one idea is to get a regional hypsometric curve and fit scaled versions of local hypsometric curves to follow the regional curve. Any suggestion on how to best do this @erikmannerfelt @rhugonnet ?

For 2/, the best would be a Bayesian approach, but you don't have time for this right now.
@adehecq I think that the detailed steps should be:
a) Normalize all local hypsometric estimation with more than X% coverage in accumulation area by both hypsometry and elevation change rate.
b) Derive area-weighted, mean hypsometric regional normalized signal from everything in a).
c) Derive area-weighted, mean regional elevation change rate at highest elevation from everything in a).
d) For glaciers with more than X% coverage in ablation area, de-normalize the regional signal of b) with the maximum dhdt of the glacier and the dhdt at highest elevation of c).
e) For glaciers with less than X% coverage in ablation area (glacier with pretty much no coverage), use with the mean elevation change rate in the region? (or for a more beautiful visual rendering, fill with the mean hypsometric signal without normalization)
What do you think?

add other scripts to extrapolate hypsometric bins, especially in the upper part where observations are often missing: one idea is to get a regional hypsometric curve and fit scaled versions of local hypsometric curves to follow the regional curve. Any suggestion on how to best do this @erikmannerfelt @rhugonnet ?

I see several approaches for the regional part.
0/ Existing: fill with the mean regional signal at a given elevation (Fanny's paper, and in Bob's paper, I don't like this much and I quote Bob's results here: the global hypsometric methods are furthest from the true values, which is perhaps not surprising in a region with a high variability of glacier elevation changes)
1/ Easy: loop through all local hypsometric pd.DataFrame, normalize those by their hypsometry and apply the area-weighted mean dhdt at the same normalized hypsometry to gap fill: at least a bit more representative of the regional signal independently of the elevation location at the scale of each glacier, but can still be off due to high inter-regional variability
2/ Best: loop through all local hypsometric pd.DataFrame, normalize by both hypsometry and elevation change and derive a mean normalized signal for the region; then, for glacier with local hypsometric (maybe with a criteria covering at least X% of the area), de-normalize by an estimated range of elevation change rate. If the rate at high elevation is not available (accumulation area full of voids), you can use the signal at half of the normalized elevation range, or maybe the best would be to use the mean elevation change rate at highest elevation captured in the region (essentially, you scale the regional hypsometric signal only by the dhdt in the ablation area of each glacier, keeping the accumulation dhdt similar than where measured for others in the region).

@rhugonnet as you may have inferred from your comment, we have the number "0" (xdem.volume.hypsometric_interpolation), which just tries to find the trend in all glacier values. It's not very good, as you mentioned.
I could get on the other two in a PR. It would be nice if this was merged first, however.

I could get on the other two in a PR. It would be nice if this was merged first, however.

@erikmannerfelt I copied most of the important stuff into issues, so feel free to merge this PR and work on the issues if you'd like. If you have time on Monday that would be great! Otherwise, I'll leave this open until I have time to look at it.


Сreate an option to modify the encoding.

"code-runner.executorMap": [
"C++": "set C++IOENCODING=utf8 && py -u"
]

Hi, can you give me an use-case?
Shouldnt the OS terminal have UTF8?

thanks. I’ve already solved this problem
пт, 17 февр. 2023 г. в 10:23, Jan Schaffranek @.***>:

Hi, can you give me an use-case?
Shouldnt the OS terminal have UTF8?
—
Reply to this email directly, view it on GitHub
https://github.com/franneck94/Vscode-C-Cpp-Runner/issues/93#issuecomment-1434220303,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZBVI2IZSO3LJNJZLSDYOY3WX4RQHANCNFSM6AAAAAAUD3HK4Y
.
You are receiving this because you authored the thread.Message ID:
@.***>


[Coverity CID :205665]Integer handling issues in /drivers/video/mt9m114.c

Static code scan issues seen in File: /drivers/video/mt9m114.c
Category: Integer handling issues
Function: mt9m114_write_reg
Component: Drivers
CID: 205665
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

*** CID 205665:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/drivers/video/mt9m114.c: 143 in mt9m114_write_reg()
137
138        switch (reg_size) {
139        case 2:
140                        *(u16_t *)value = sys_cpu_to_be16(*(u16_t *)value);
141                        break;
142        case 4:
     CID 205665:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
     "*((u16_t *)value) >> 24" is 0 regardless of the values of its operands. This occurs as the bitwise first operand of "&".
143                        *(u16_t *)value = sys_cpu_to_be32(*(u16_t *)value);
144                        break;
145        case 1:
146                        break;
147        default:
148                        return -ENOTSUP;

92ee992e7cc


Create News,-blogs,-videos-and-articles.md

Add a new article about using PactNET

Thanks for your contribution :)

@EricJWHuang sorry, could you please do this again, but on the master branch, not the test one.
Thanks.

@mboudreau Sure Michel but which folder should I upload to?

I think it should go under _docs with the title of 'Articles & News'.
Please refer to other MD files under that folder for the structure.
Thanks :)
On Thu, Nov 24, 2016 at 12:32 PM EricHuang-AGL<EMAIL_ADDRESS>wrote:

@mboudreau https://github.com/mboudreau Sure Michel but which folder
should I upload to?
[image: image]
https://cloud.githubusercontent.com/assets/23227124/20583901/fd590d74-b241-11e6-96a8-eeba26c8de74.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pact-foundation/pact-foundation.github.io/pull/7#issuecomment-262669604,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjA5Dv4oy20WAVaZjee6otGH7ZLcAOMks5rBOkSgaJpZM4K7LgJ
.

This needs to be on the test branch to be published in the gitbook at docs.pact.io.

I've added it to both.
On Thu, Nov 24, 2016 at 2:43 PM Ronald Holshausen<EMAIL_ADDRESS>wrote:

This needs to be on the test branch to be published in the gitbook at
docs.pact.io.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pact-foundation/pact-foundation.github.io/pull/7#issuecomment-262683806,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjA5FZJLu0rn3q7o_2tZFXkVh4uMIetks5rBQfzgaJpZM4K7LgJ
.


new_os_versions: OHIs Release

All integrations need to be released as aptly does not work as rpm (where we could copy the packages and just release the agent)

[ ] nri-apache
[ ] nri-cassandra
[ ] nri-consul
[ ] nri-couchbase
[ ] nri-docker
[ ] nri-elasticsearch
[ ] nri-f5
[ ] nri-haproxy
[ ] nri-jmx
[ ] nri-kafka
[ ] nri-memcached
[ ] nri-mongodb
[ ] nri-mssql
[ ] nri-mysql
[ ] nri-nagios
[ ] nri-nginx
[ ] nri-oracledb
[ ] nri-postgresql
[ ] nri-rabbitmq
[ ] nri-redis
[ ] nri-snmp
[ ] nri-varnish
[ ] nri-vsphere

blocked until we get windows certificate creds in GH


[Watson][c80fa41e-5b32-e9a2-8ba7-4b1a2ca58139]CLR_EXCEPTION_System.NullReferenceException_80004003_PowerLauncher.dll! PowerLauncher.App+__c__DisplayClass22_0._Dispose_b__0

Generated issue from Watson
Watson Link:  https://watsonportal.microsoft.com/Failure?FailureSearchText=c80fa41e-5b32-e9a2-8ba7-4b1a2ca58139
ADO Link: https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems#id=27338442&triage=true&fullScreen=true&_a=edit
Process: powerlauncher.exe,
Module: powerlauncher.dll v<IP_ADDRESS>

Note: This is in the same bucket of failures as clr_exception_system.nullreferenceexception_80004003_powerlauncher.dll!unknown
There is a 90 day hit of 121 just for this <IP_ADDRESS> release

@somil55 Setting this as fixed.  Let me know if I'm missing something


EAS iOS development build crashes - "RNSScreen" was not found in the UIManager

Summary
EAS iOS development build crashes once the app is loaded
"dependencies": {
"@babel/preset-env": "^7.1.6",
"@expo/config-plugins": "^5.0.2",
"@expo/prebuild-config": "^5.0.5",
"@react-native-async-storage/async-storage": "~1.17.11",
"@react-native-community/cli": "^6.2.0",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^6.1.3",
"@react-navigation/stack": "^6.2.1",
"eas-cli": "^3.5.2",
"expo": "^47.0.0",
"expo-asset": "~8.7.0",
"expo-constants": "~14.0.2",
"expo-dev-client": "~2.0.1",
"expo-device": "~5.0.0",
"expo-file-system": "~15.1.1",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.3.0",
"expo-location": "~15.0.1",
"expo-modules-autolinking": "^1.0.2",
"expo-screen-orientation": "~5.0.1",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"expo-store-review": "~6.0.0",
"expo-tracking-transparency": "~3.0.1",
"expo-updates": "~0.15.6",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",
"react-native-async-storage": "^0.0.1",
"react-native-gesture-handler": "~2.8.0",
"react-native-google-mobile-ads": "^9.1.1",
"react-native-maps": "1.3.2",
"react-native-purchases": "^5.8.0",
"react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.9",
"react-native-webview": "11.23.1",
"uuid5": "^1.0.2"
},
Managed or bare?
managed, eas dev build
Environment
System:
  OS: macOS 13.2
  Shell: 5.8.1 - /bin/zsh
Binaries:
  Node: 16.15.1 - /usr/local/bin/node
  Yarn: 1.19.2 - /usr/local/bin/yarn
  npm: 8.11.0 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
  CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
IDEs:
  Android Studio: 2020.3 AI-203.7717.56.2031.7583922
  Xcode: 14.2/14C18 - /usr/bin/xcodebuild
npmPackages:
  expo: ^47.0.0 => 47.0.13
  react: 18.1.0 => 18.1.0
  react-dom: 18.1.0 => 18.1.0
  react-native: 0.70.5 => 0.70.5
  react-native-web: ~0.18.9 => 0.18.12
npmGlobalPackages:
  eas-cli: 3.5.2
  expo-cli: 6.2.1
Expo Workflow: managed

Error output
ERROR  Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager.
This error is located at:
in RNSScreen (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by InnerScreen)
in Suspender (created by Freeze)
in Suspense (created by Freeze)
in Freeze (created by DelayedFreeze)
in DelayedFreeze (created by InnerScreen)
in InnerScreen (created by Screen)
in Screen (created by MaybeScreen)
in MaybeScreen (created by CardStack)
in RNSScreenContainer (created by ScreenContainer)
in ScreenContainer (created by MaybeScreenContainer)
in MaybeScreenContainer (created by CardStack)
in RCTView (created by View)
in View (created by Background)
in Background (created by CardStack)
in CardStack (created by HeaderShownContext)
in RNCSafeAreaProvider (created by SafeAreaProvider)
in SafeAreaProvider (created by SafeAreaInsetsContext)
in SafeAreaProviderCompat (created by StackView)
in RCTView (created by View)
in View (created by GestureHandlerRootView)
in GestureHandlerRootView (created by StackView)
in StackView (created by StackNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by StackNavigator)
in StackNavigator (created by App)
in EnsureSingleNavigator
in BaseNavigationContainer
in ThemeProvider
in NavigationContainerInner (created by App)
in RCTSafeAreaView (created by App)
in App (created by withDevTools(App))
in withDevTools(App)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)
Reproducible demo or steps to reproduce from a blank project
not applicable

I have the same problem; would appreciate if anyone has tips or advice


cups-filters: 1.28.17 -> 2.0.1

Seems to work (test page prints successfully from system-config-printers), done:

[x] add libcupsfilters package
[x] add libppd package
[x] tested I can print a test page via system-config-printers
[x] check libcupsfilters for missing optional dependencies
[x] check libppd for missing optional dependencies
[x] check cups/filter.nix for now-unneeded dependencies
[x] also package cups-browsed separately
[x] formatting

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Looks like we are not going to have another review. I did more tests and it appears to be fine so I'm going to merge.


No data occurs in machine 2 5-12-2022 shift A

Actually, two different records has created for the particular start time. We will check the root cause

Root Cause : While handling the offline capability during no data received in MongoDB for that particular hour device status incorrectly handled
Solution : Device status handling logic is changed and fixed


How to update value visually by changing prop?

Ask your Question
We want to update the slider visually while a track is playing, we want to be able to read from a constantly updated position. This seemed to work with the react native slider but not with this one, any ideas?
Thanks and awesome work!
Our Slider code looks like this:
<Slider
        style={{ marginRight: 10, marginLeft: 10, flex: 1 }}
        minimumValue={0}
        maximumValue={1}
        value={
          this.props.seekSliderPosition ? this.props.seekSliderPosition : 0
        }
        onValueChange={value => this.props.onSeekSliderValueChange(value)}
        onSlidingComplete={value =>
          this.props.onSeekSliderSlidingComplete(value)
        }
        disabled={
          this.props.playbackState === PLAYBACK_STATES.LOADING ||
          this.props.playbackState === PLAYBACK_STATES.ENDED ||
          this.props.playbackState === PLAYBACK_STATES.ERROR
        }
        minimumTrackTintColor={Colors.brandBlue}
        maximumTrackTintColor={Colors.backgroundTrackColor}
        thumbTintColor={Colors.brandBlue}
      />

On our store we have:
@computed
  get seekSliderPosition() {
    if (
      this.playbackInstance !== null &&
      this.playbackInstancePosition != null &&
      this.playbackInstanceDuration != null &&
      this.playbackInstanceDuration !== 0
    ) {
      return this.playbackInstancePosition / this.playbackInstanceDuration;
    }
    return 0;
  }

HI, @alejomendoza have you solved this one?

@alejomendoza
Does it affect both platforms Android & iOS?

Hello there! I was facing the same issue and managed to solve it by wrapping a slider with  as seen in custom controls example available here:
https://github.com/ihmpavel/expo-video-player/blob/c11d4631a6ee556e7304e0f3d36e0828a901ca29/lib/index.tsx#L689
Hope it helps!


[CI] Fix the CI!

Motivation and Context
For some reason our CI started having certificate issues with cmake. AFAIK this is due to Ubuntu 16.04 being EOL. This PR moves the CI to 20.04.
There was one change needed to make things run on 20.04, which was make the method we call in the Simulator constructor not virtual (as clang-tidy rightfully complains about that being a can of worms). We currently don't overload those anywhere expect in python, but python doesn't need them to be marked as virtual.
How Has This Been Tested
With the CI
Docs change / refactoring / dependency upgrade

The some reason is that Let's Encrypt old Root CA expired this weekend: https://portswigger.net/daily-swig/lets-encrypt-root-cert-update-catches-out-many-big-name-tech-firms

Interesting. I wonder why that only seems to matter for the ubuntu 16.04 image.

Because the distro is so old, the Root CAs were never updated.

LGTM. Let's merge this as it would be great if we can restore the CI. 👍

@erikwijmans I found a lot less invasive fix by doing apt-get update/ apt-get upgrade at the beginning of the circleci file and tested in the fix_rootca_quickfix branch.

@erikwijmans Alternative quickfix: https://github.com/facebookresearch/habitat-sim/pull/1518

Covered Ubuntu upgrade in #1665.


Feature Request: Migrate UI Text Strings To a Separate File

Hi, I would like to request some modifications to the code that place UI text strings into a separate file,
for easier UI translation that would persist through updates.
By "UI text strings", I mean text that would appear during usage. For example, the string Format="%#Hh, %#Mm remaining."
from [BatteryExpectedLife] of energy.ini, that would appear when hovering cursor upon it.
I would like to request placing them all in a separate file, so one could perform translations such as Format="剩餘 %#H時 %#M分"
without having to dig through every config file every time updates were made.

Localization would be an amazing feature to implement into the Rainmeter Suite. I will look into refactoring the code structure so that translations can be condensed into a singular file/folder nicely, but it will take time.
For clarification, like you specified this will only apply to visible UI elements. Strings such as Skin folder names unfortunately MUST continue to be in English - limitations like Lua only being able to handle directory navigation of English characters from Issue #25 are beyond my control.
Additionally, while I will handle restructuring the code, I unfortunately cannot provide the actual localization myself nor do I have the resources to facilitate quality control for accurate translations. I have to depend on users such as yourself to provide the translations to the community.
I will update this thread once progress has been made on the restructuring - hopefully in a couple of weeks.

Posting an update as it as been a few weeks:
I definitely am seeing in retrospect my awful code structure as strings that need to be extracted for localization are strewn between Rainmeter configs, .json databases and Lua scripts without discrimination. I have tackled the most important ones, but still have a good chunk of Menu UI elements to go through. After that, I need to cycle through all possible configurations to make sure everything remains in working order and that all relevant strings are properly extracted for localization.
I am also taking this opportunity to "update-proof" the suite to address Issue #7 once and for all. Tackling the localization restructure has given me a possible idea on how to handle seamlessly updating versions without bricking all user configurations going forward. I will need additional time to test (and hopefully implement!) this theoretical solution. I am optimistically aiming for a patch release before the end of this year, but it may get delayed into January.


swap bug

when try to swap token is not showing

@darwa89 Talk to Algorand Support on the Live support page so that your issue can be looked into.


Rails.env is not set on schedule.rb with Capistrano

Rails env is not set in any Capistrano task (RAILS_ENV is nil so the server use the default).
Based on that problem it's impossible to use Rails.env in my schedule.rb.
It's very useful to know the environment and do different stuff in staging or production environment.
One possibile solution:
adding rails_env: fetch(:rails_env, fetch(:stage)) in the with block:
  def setup_whenever_task(*args, &block)
    args = Array(fetch(:whenever_command)) + args

    on roles fetch(:whenever_roles) do |host|
      args_for_host = block_given? ? args + Array(yield(host)) : args
      within release_path do
        with fetch(:whenever_command_environment_variables).merge(rails_env: fetch(:rails_env, fetch(:stage))) do
          execute *args_for_host
        end
      end
    end
  end

:+1: also need this

Doesn't this accomplish the same thing?
"before whenever:update_crontab", "deploy:set_rails_env"

Then, you can access the rails_env in your config/schedule.rb using @set_variables[:environment]

I tried without success, Rails still loads with the development environment (yes, I know now I can get the environment from @set_variables[:environment] but if I use a gem that depends on environment (like https://github.com/laserlemon/figaro) it doesn't work.
With your tips ("deploy:set_rails_env") it executes:
INFO [51e8776e] Running ~/.rvm/bin/rvm 2.1.5 do bundle exec whenever --update-crontab base-backend_staging --set environment=staging --roles=web,app,db as<EMAIL_ADDRESS>DEBUG [51e8776e] Command: cd /home/deploy/apps/base-backend_staging/releases/20150827192821 && ~/.rvm/bin/rvm 2.1.5 do bundle exec whenever --update-crontab base-backend_staging --set environment=staging --roles=web,app,db

Editing whenever rake tast as on the first post it load Rails env correctly:
INFO [f2a0eaa1] Running ~/.rvm/bin/rvm 2.1.5 do bundle exec whenever --update-crontab base-backend_staging --set environment=staging --roles=web,app,db as<EMAIL_ADDRESS>DEBUG [f2a0eaa1] Command: cd /home/deploy/apps/base-backend_staging/releases/20150827193618 && ( RAILS_ENV=staging ~/.rvm/bin/rvm 2.1.5 do bundle exec whenever --update-crontab base-backend_staging --set environment=staging --roles=web,app,db )

so why not just add to the top of config/schedule.rb:
ENV['RAILS_ENV'] = @set_variables[:environment]

Because Rails has already been loaded

i've got the same problem, logs below:
INFO [3a2fc132] Running /usr/local/rvm/bin/rvm default do bundle exec whenever --update-crontab stampex-api --set environment=production --roles=app,web,db as<EMAIL_ADDRESS>DEBUG [3a2fc132] Command: cd ~/xxx/releases/20150911055113 && /usr/local/rvm/bin/rvm default do bundle exec whenever --update-crontab xxx-cron --set environment=production --roles=app,web,db
DEBUG [3a2fc132] 	/home/deployer/xxx/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
DEBUG [3a2fc132] 	:
DEBUG [3a2fc132] 	'development' database is not configured. Available: ["production"]
DEBUG [3a2fc132] 	 (
DEBUG [3a2fc132] 	ActiveRecord::AdapterNotSpecified
DEBUG [3a2fc132] 	)

I've already set rails_env to production in my deploy config, and the command also execute with --set environment=production.
BUT, my rails loaded with the environment development so the ActiveRecord throw the exception back to me.
I think the patch above (https://github.com/javan/whenever/pull/562) is necessary to solve this problem.

I'm very curious what your use case is.  if rails has already been loaded before config/schedule, where and how was it loaded?

I think it was loaded in application.rb with require 'rails/all'.
@david50407 please do export  | grep _ENV and tell us if you have set RAILS_ENV/RACK_ENV

How does the command /usr/local/rvm/bin/rvm default do bundle exec whenever load any part of your rails application?  The only file from your project that it loads is config/schedule.rb and whatever is required from there.

I have the same problem.
shedule.rb:
ENV['RAILS_ENV'] = @set_variables[:environment]
require File.expand_path(File.dirname(__FILE__) + "/environment")
setting = Setting.first

set :job_template, "bash -l -i -c ':job'"

set :output, "/var/log/cron.log"

if setting and setting.unload_orders
  every setting.upload_period.minutes do
    rake "exchange:send_orders_ftp"
  end
end

if setting and setting.unload_audit_documents
  every setting.upload_period.minutes do
    rake "exchange:send_audit_documents_ftp"
  end
end

if setting and setting.unload_refunds
  every setting.upload_period.minutes do
    rake "exchange:send_refunds_ftp"
  end
end

The error occurs when deploy with capistrano:
  * executing "cd /var/www/mss/releases/20151003121604 && bundle exec whenever --update-crontab mss --set environment=production --roles db"
    servers: ["<IP_ADDRESS>"]
    [<IP_ADDRESS>] executing command
 ** [out :: <IP_ADDRESS>] /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection'
 ** [out :: <IP_ADDRESS>] :
 ** [out :: <IP_ADDRESS>] database configuration does not specify adapter
 ** [out :: <IP_ADDRESS>] (
 ** [out :: <IP_ADDRESS>] ActiveRecord::AdapterNotSpecified
 ** [out :: <IP_ADDRESS>] )
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-import-0.3.1/lib/activerecord-import.rb:4:in `establish_connection_with_activerecord_import'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:88:in `block (2 levels) in <class:Railtie>'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `each'
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
 ** [out :: <IP_ADDRESS>]
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:80:in `block in <class:Railtie>'
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `instance_exec'
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `run'
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:55:in `block in run_initializers'
 ** [out :: <IP_ADDRESS>] from /var/www/mss/shared/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `each'

As I understand it, he tries to find a development database. Settings which in my database.yml not.
Is there a solution to this problem?

@galievruslan I don't think your conclusion is correct.  If it were trying to find a development database, and there was no development key in your database.yml, then you'd get the error message from line 39 of connection_specification.rb ("#{spec} database is not configured"), but you're actually getting the error on line 41: "database configuration does not specify adapter".
To debug, I would add puts hash.inspect after line 39.  My guess is that you'll find that it is using production and that the adapter is missing from the configuration there.

No, you're wrong. If my database.yml file config register setting for the database development will swear that the database development is not found.
Ie whenever it uses the default development environment when selecting data:
setting = Setting.first
This my database.yml :
production:
        adapter: postgis
        encoding: unicode
        pool: 5
        host: localhost
        database: mss
        username: mss
        password: ********

Strange, because that doesn't match the error message you're getting


Languages_have_language_rules displays Language_Rules view from the add_language_rule_to_language form

Instead of navigating back to the view of the relationship between the Language table and the Language_Rules table, it navigates directly to Language_Rules. This does not show the actual relationship, which is a one way cascade.
sentientnova
—
Today at 8:51 PM
So we don't need a delete for language rules?
The intersection of languages and language rules
castimir
—
Today at 8:51 PM
If we delete that relationship, the language can't be generated because the rule is no longer associated with the language.
So the only proper way to delete is by first deleting the language, then the language-rule relationship, then the language-rule.
So a one way cascade on delete from language_rule to the intersection table to languages
sentientnova
—
Today at 8:53 PM
So we just display language rules again?
castimir
—
Today at 8:54 PM
Not sure I follow, sorry
sentientnova
—
Today at 8:55 PM
The add_language_rule_to_language_form in languages_have_languages_rules links to language rules display
Instead of having one associated
castimir
—
Today at 8:55 PM
oh no
let me look, I may have made a typo
yeah, typo
sorry, the names are so similar
sentientnova
—
Today at 8:56 PM
Yeah, we should probably update that at some point but for tonight it's stuck

I actually think there's no languages_have_language_rules to display currently, looking into creating something


<EMAIL_ADDRESS>issues on deno runtime

Confirm this is a Node library issue and not an underlying OpenAI API issue

[X] This is an issue with the Node library

Describe the bug
On 4.16.1, when trying to stream chunks, I consistently seem to only get 1 part back that looks like this:
{
  id: "chatcmpl-8IPirfnuikMfsLCSj3uxhXPmqeU7k",
  object: "chat.completion.chunk",
  created:<PHONE_NUMBER>,
  model: "gpt-4-0613",
  choices: [
    {
      index: 0,
      delta: { role: "assistant", content: "" },
      finish_reason: null
    }
  ]

but then nothing else.
Streaming was working okay when using<EMAIL_ADDRESS>To Reproduce

Use 4.16.1 and try to stream back 1 chunk at a time.

This is the current (non-working) version that uses 4.16.1:
import OpenAI from<EMAIL_ADDRESS>import { corsHeaders } from "../_shared/cors.ts";

const apiKey = Deno.env.get("OPENAI_API_KEY");

const openAI = new OpenAI({
  apiKey,
});

export type ReqJSON = {
  systemPrompt: string;
  userPrompt: string;
  messages: {
    role: "assistant" | "user";
    content: string;
  }[];
};

Deno.serve(async (req) => {
  if (req.method === "OPTIONS") {
    return new Response("ok", { headers: corsHeaders });
  }

  try {
    const body = (await req.json()) as ReqJSON;
    const { userPrompt, messages } = body;
    const encoder = new TextEncoder();
    const stream = new TransformStream();
    const writer = stream.writable.getWriter();
    await writer.ready;
    const streamRes = await openAI.chat.completions.create({
      model: "gpt-4",
      messages: [
        {
          role: "system",
          content: `You are a helpful assistant`,
        },
        {
          role: "user",
          content: userPrompt,
        },
        ...messages,
      ],
      stream: true,
    });
    console.log("streamRes", streamRes);
    for await (const part of streamRes) {
      console.log("part", part);
      if (part.choices[0].finish_reason) {
        await writer.close();
        break;
      }
      const token = part.choices[0].delta.content || "";
      const msg = encoder.encode(`data: ${token}\n\n`);
      await writer.write(msg);
    }

    return new Response(stream.readable, {
      headers: { ...corsHeaders, "Content-Type": "text/event-stream" },
    });
  } catch (e) {
    console.error("error occurred:", e);
    return new Response(JSON.stringify({ error: e.message }), {
      status: 500,
      headers: { ...corsHeaders, "Content-Type": "application/json" },
    });
  }
});

Here was the previous working version that used the unofficial 1.4.3 version:
import { OpenAI } from<EMAIL_ADDRESS>import { corsHeaders } from "../_shared/cors.ts";

const apiKey = Deno.env.get("OPENAI_API_KEY");

const openAI = new OpenAI(apiKey || "");

export type ReqJSON = {
  userPrompt: string;
  messages: {
    role: "assistant" | "user";
    content: string;
  }[];
};

Deno.serve(async (req) => {
  if (req.method === "OPTIONS") {
    return new Response("ok", { headers: corsHeaders });
  }

  try {
    const body = (await req.json()) as ReqJSON;
    const { userPrompt, messages } = body;
    const encoder = new TextEncoder();
    const stream = new TransformStream();
    const writer = stream.writable.getWriter();
    await writer.ready;
    openAI.createChatCompletionStream(
      {
        model: "gpt-4",
        messages: [
          {
            role: "system",
            content: `You are a helpful assistant`,
          },
          {
            role: "user",
            content: userPrompt,
          },
          ...messages,
        ],
      },
      async (res) => {
        if (res.choices[0].finish_reason) {
          await writer.close();
          return;
        }
        const token = res.choices[0].delta.content || "";
        const msg = encoder.encode(`data: ${token}\n\n`);
        await writer.ready;
        await writer.write(msg);
      }
    );

    return new Response(stream.readable, {
      headers: { ...corsHeaders, "Content-Type": "text/event-stream" },
    });
  } catch (e) {
    return new Response(JSON.stringify({ error: e.message }), {
      status: 500,
      headers: { ...corsHeaders, "Content-Type": "application/json" },
    });
  }
});

Code snippets
No response
OS
macOS
Node version
deno
Library version
openai v4.16.1

V1 was totally different (not provided by OpenAI), v4 is an entirely different interface. Please see the readme and the examples folder for how to use v4. Note the toReadableStream() helper which should help simplify much of your code.

aa

@joshling1919 did you ever get this working with the latest API? I'm trying to do exactly what you were trying to do using a Deno edge function but I can't seem to translate the examples in the official node library to stream a response from Deno edge functions.. If you could share a working piece of code that would be just amazing.


[GSSOC'23] Add ZigZag Pattern in Pattern Directory

This commit adds a new ZigZag pattern code implementation to the Pattern directory. The ZigZag pattern is a popular design that creates a visually appealing and dynamic effect. The code generates a ZigZag pattern using asterisks (*) and spaces, allowing users to specify the size and number of repetitions. This addition enhances the collection of patterns available in the directory and provides users with more options for their projects or applications.

Please assign this issue to me under GSSoC'23


Adapt to new I2C bus/device interface

Depends on https://github.com/rust-embedded/embedded-hal/pull/392
Also adds 10-bit addressing support.
Not tested in hardware yet, though.
Fixes #82

r? @posborne
(rust-highfive has picked a reviewer for you, use r? to override)

Done in other PRs.


iOS: widget for iOS 14

WWDC20 has deprecated the current widget mechanism, in favor of a SwiftUI-based non-interactive design.
The current implementation is still supported for now, but is limited to the bottom of the Today view instead of the home screen on iOS 14, and will probably stop working in due course.  The widget will need to be rewritten using SwiftUI.
For NewsBlur, this shouldn't be too problematic, since it displays stories, and tapping one opens the app.  It should be feasible to reimplement that using WidgetKit. Probably not urgent; won't be able to have the widget on a home screen until this is done, but the new widget wouldn't work on iOS 13 and earlier.

Saved searches should have unread counts so we can have those as widgets. Would be incredibly valuable.

Work on the new widget is underway. It still has a bunch of appearance tweaks and functionality to complete, but the basic thing is operational.
The old widget is still there for now, for comparison; it'll be removed once the new one is done.
I merged the Catalyst branch into the Dejal branch before committing this, so the Dejal branch can be considered the TestFlight release-ready one, and Catalyst for ongoing incomplete work.

Good to know on dejal vs catalyst. I'll release dejal to TestFlight now, but I would like to hit all of the other UI bugs on TestFlight so we can get the release out. I'll go trhough now and move the remaining issues that need to be fixed before launch to critical status.

Also move author names to regular case. And once we get favicon and story image preview in there, this will be ready.

Okay. Hopefully I should be able to fix all of those, and finish off the widget, in my next NewsBlur work block. I'll try to get it done before the end of the month.

This is in the Catalyst (my work in progress) branch, but is probably good enough to go live now. So I suggest that you try it, and if you agree, merge the Catalyst branch into the Dejal branch, and do the TestFlight from that.
(Maybe we should rename the "Dejal" branch to "TestFlight", since that's what it's used for?)
There are other improvements that could be done in the future (e.g. support for multiple widgets with different content), but that would be a lot more work, so can wait for now.
If you're satisfied with the widget as-is, please close this issue.

This is terrific! I updated the icon for it.
When I installed the app and then went to install the widget, it was blank. And when I went into the Widget dialog in the app, 0 sites were selected. I hit Select All and the app crashed.
Then the widget started working. But it didn't show unread vs read, so after I tapped a story, it was still unread in the widget. While writing this up, it looks like the widget refreshed, but it should somehow acknowledge reading the story.

Would an option be possible to show only the title and not the story contents? As you can see in the above screenshot, space is very limited and sometimes story content is redundant, as it repeats the title. This would also make room for longer titles to span more than one line.

@samuelclay I'll see if I can reproduce the crash. The widget preferences in the app should be unchanged from previous versions. Widgets refresh on a timeline managed by iOS; I do try to tell it to update when a story is read, but maybe that isn't quite right; I'll take another look.
Also, this is in the Catalyst (future work) branch; if you feel it's good enough, feel free to merge into the Dejal (TestFlight) branch. Maybe we should rename the branches?
@Splike That is certainly possible, if Sam wants it. It might have to wait for a future update, since we're working on locking down this release.

In addition to the fixes in that commit, a comment on updating on reading: it does, but with the current behavior of not marking as read when showing the first story, it looks like it isn't working. Scroll to the next one and it'll be marked as read, and the widget will update. Another reason to change that behavior. (See #1500.)
I think the widget is ready for release now, so could be merged into the Dejal (TestFlight) branch. Just waiting your word.

Tapping on a story when in the loading screen takes the user to a nowhere land.

My widget doesn't quite look like yours. iPhone SE 2.

The widget doesn't seem to update after I read a story or when I scroll back to the homescreen it's on. Are we being rate limited by Apple?

We can make font sizes much smaller, btw. Feels like Apple has them all at 10pt while we're at 12pt-13pt. I would prefer smaller fonts and a bit more negative space between title and subtitle as well as margins all around. We can also leave out author.
Something I learned from notifications, full title is more important than a single line of title and a single line of content. Let's make the title take as much space as it needs, and if room, show content preview. But I'm leaning towards 3 story titles on small and 6 on large, much like the NYTimes and Stocks app.

Remember, just going to a story won't mark it as read, until I change that behavior; you have to scroll it or go to another story. You could be rate limited if you're doing lots of testing right now.

Remember, just going to a story won't mark it as read, until I change that behavior; you have to scroll it or go to another story.

Sure, we're about to change that behavior, but this qualifies as a mark-read event, even in the upcoming manual mark read mode.

Wait, no, in the manual mark read mode, this won't do it still. You have to hit that button. But this is the equivalent to tapping the story title in the list.

Looks good, but can we use Whitney as the font instead of the system font?

I styled it a bit. It's nearly there, but do you think we can add the time somewhere? I have the two side by side and miss knowing relevancy.

Also, does the old widget not work anymore? Seems to take me into an infinite loop.

Tapping into stories always loads a (null) feed and spins on Finding story...

The small widget still feels cramped. Can we increase padding and tamp the font size down by 1 for just the small widget?

I would also love for the widget to respect the user's image size and position preference, as it makes for terrific screenshots.

I'll see what I can do to improve it.
Not sure if I can use a custom font or not; should be able to, but unsure if the widget can access it. Will try.
For the time, I could put it to the right of the feed name (right justified). Don't want to lose the vertical height for the title.
The old widget will be removed, being redundant. Just there for now for comparison.

Looking good, eh?

Nice, looking great. And I agree on the datetime adding visual clutter, but NewsBlur as a whole has that slight information overload that I just love.
There's a critical bug when tapping on a story:
https://user-images.githubusercontent.com/44229/151366196-33190172-b261-4ecf-8ed0-5233339264c8.mov
Also note that I merged the dejal and catalyst branch and pushed to the new testflight branch with the build number.
Lastly, only 3 stories are showing on a 10.5" iPad. Which would be fine if the font size matched. But I'd rather stick the extra 2-3 stories in there at the right size.

Okay, I will commit to the Dejal branch now, and you can merge that into TestFlight when ready for builds.
I have disabled the Mac edition in the Dejal branch, as it is not ready for release yet. There's still a lot of work to do before it is ready.
The Catalyst branch can be left for future work on the Mac edition; on hold for now.

I can't find a simulator for a 10.5" iPad, so can't repro that one, but it looks like it is stretching out a small widget; the large widget always includes six stories, and the small three.

It seems to me that if I were to read one of the stories and the widget refreshed before any new stories came in, then it would display fewer stories. That's my hunch, but it definitely seems like its not displaying stories found in the single page of river it fetches. Are they hidden? I have a few high volume feeds (like the Hacker News firehose) that are publisher-thumbs-down but a few title-thumbs-up.  Try that with a feed or folder and point the widget to it.
Eventually we should enable multiple configurable widgets, possibly with the folder/feed being the only configurable element.
I've also noticed that the NewsBlur widget takes a handful of seconds longer than any of the other widgets to display. Explains why it's a blank white widget in the preview screen when first installing it. Any thoughts on why that is? Can we not access the main app's cache? Can we do a handoff when clicking stories so we don't have to fetch twice and have a fast UX?

The widget fetches the stories independently of the app, since it could be running when the app isn't.
It caches the feeds, stories, feed icons, and story previews, and only loads images if not cached.
The first fetch does take a little while, which can result in a blank widget, though most of the time it is populated.
It could access the data from the main app as initial data, but it'd likely be stale, so would need to load everything anyway. Plus doing that would require duplicating all the caching code from the widget extension in the app.
There may be more optimizations that can be done in due course.
As you say, we'll likely want to support multiple widgets, with the ability to specify a folder or feed for each. That's quite a bit more complicated, so I left it as a future enhancement.


HIVE-24858: UDFClassLoader leak in Configuration.CACHE_CLASSES

See HIVE-24858.
How was this patch tested?
Manually

not work for me in hive 2.3.7
remove udfclassloader from CACHE_CLASSES when session close


Language Engine

Frenetic should contain a language engine, to allow remapping command/cvar descriptions/etc. to different languages easily.

Voxalia has set an example for us! https://github.com/FreneticXYZ/Voxalia/issues/8

The language engine is in FGE now: https://github.com/FreneticLLC/FreneticGameEngine/blob/master/FreneticGameCore/LanguageEngine.cs
We should move that to FrenUtil, allowing it to be used in FS and elsewhere.


SharingIsCaring-Granamic-UI-Template

Q
A

Bug fix?
no

New feature?
no

New sample?
yes

Related issues?
none

Solution Details

Q
A

Solution requires premium license
no

Solution uses experimental features (see licensing guidelines)
no

Which connectors are used?
none

Solution uses on-premises connectors?
no

Solution uses custom connectors?
no

Layout
Tablet

What's in this Pull Request?

This pull request contains my canvas app template named Granamic UI Template. This app contains sample custom components that are built using HTML, CSS and Canvas App OOTB Controls.

@fabiofranzini Any Update?


Different source speakers

Hi, thanks for sharing such a good work!
Have you ever tried training with different source speakers?

@EmreOzkose how much time did it take for training? You used GPU?

I haven't tried yet

I am doing some experiments with different dataset. Results are very good if I use single speaker to target. However when I use multiple source speaker to one target, it is not good as previous one. I just wanna report. Tensorboard output is here:

Green one is continuation of blue one.
Blue -> multi-speaker
Orange -> single-speaker
Multi-speaker discriminator cannot decrease after a point. (~1M)


Deprecated elements & attributes

It would be a nice addition to distinguish deprecated elements & deprecated attributes. If you're okay I can try to update your script to include that.

Sure, go ahead. PRs are welcome. :slightly_smiling_face:

Would you like to keep both json files separate or is it fine if I re-structure them into a single json with the following structure?
Or maybe create a thrid json file with this structure?
{
    "*": {
        "deprecated": false,
        "attributes": [
            { "name": "accesskey", "deprecated": false },
            { "name": "class", "deprecated": false },
            ...
        ]
    },
    "a": {
        "deprecated": false,
        "attributes": [
            { "name": "download", "deprecated": false },
            { "name": "href", "deprecated": false },
            ...
        ]
    },
    "abbr": {
        "deprecated": false,
        "attributes": []
    },
    ...
}

Single file with this structure sounds good 👍
On 7. 10. 2024 16:41, Dynèsh Hassanaly @.***> wrote:

Would you like to keep both json files separate or is it fine if I
re-structure them into a single json with the following structure?
Or maybe create a thrid json file with this structure?
{
"*": {
"deprecated":false,
"attributes": [
{"name":"accesskey","deprecated":false  },
{"name":"class","deprecated":false  },
...
]
},
"a": {
"deprecated":false,
"attributes": [
{"name":"download","deprecated":false  },
{"name":"href","deprecated":false  },
...
]
},
"abbr": {
"deprecated":false,
"attributes": []
},
...
}
—
Reply to this email directly, view it on GitHub
https://github.com/jozo/all-html-elements-and-attributes/issues/2#issuecomment-2397127647, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABANC3E6LDRWK6IKJVL3NC3Z2KMSZAVCNFSM6AAAAABPPXR2LOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXGEZDONRUG4.
You are receiving this because you commented.Message ID:
@.***>


Linking About to another website

Is your feature request related to a problem? Please describe.
At the top of a fastpages website, there is an "About" button. The contents of the about site is controlled by _pages/about.md. However, sometimes we want to link it to another website, like a personal website.
Describe the solution you'd like
Add an option to link to another website instead of _pages/about.md

You have to setup a redirect , and edit the HTML of your head if the page is the about page.
Not going to add a feature to fastpages for this.
Some hints to get you started.  You should do a tutorial on Jekyll
https://jekyllrb.com/docs/
and understand _includes
https://jekyllrb.com/docs/includes/
Then you can setup a redirect with HTML
https://dev.to/steveblue/setup-a-redirect-on-github-pages-1ok7
Hope that helps

If I want to add a new navigation link to the right of the three existing links, for example: Chinese
So there would be [About Me] [Search] [Tags] [Chinese] on the home page.
How should I do that?
@hamelsmu Thanks in advance.


Critical security issue [solved in 0.8.9]

hello, I've find a critical vulnerability inside beaker browser, and have sent you details of this vulnerability by sending email to @pfrazee . Please check it and feel free to contact me.

Thank you for filing, I’ve received your email. I’ll look into this today.

On Mar 10, 2020, at 3:47 AM, Image<EMAIL_ADDRESS>wrote:

hello, I've find a critical vulnerability inside beaker browser, and have sent you details of this vulnerability by sending email to @pfrazee . Please check it and feel free to contact me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

This issue was confirmed and patched. Anybody currently using Beaker 0.8.x should please update to Beaker 0.8.9 or the latest master if building from source.
I will post a detailed post-mortem on this issue after users have had time to update. Huge thanks to @imagemlt for researching and responsibly disclosing this issue!

Snap store still contains 0.8.8 as latest version.
https://snapcraft.io/beaker-browser

@rzelnik I've never published the builds anywhere other than on GitHub. Whoever uploads that will need to add the new binary.

@pfrazee I will let him know.

Post mortem on this issue
First I want to say, thank you so much to @imagemlt for researching and privately disclosing this issue. They were extremely helpful, clear, and generous with their time.
Beaker uses Electron/Chromium's tools to sandbox every tab from the rest of the system. Like other browsers, this sandbox exists at two levels: the Web Platform sandbox which only provides safe APIs, and the process sandbox which restricts any kind of operations if the Web Platform sandbox were penetrated. Web API calls are translated into messages to Beaker's internal processes which then apply permissions and handle their requests.
When a page loads, Beaker use's an Electron feature called the "preload script" to inject its custom Web APIs (e.g. the Hyperdrive API). These APIs are effectively wrappers around inter-process messaging channels. The preload script environment provides Electron APIs for accessing the channels, and then removes those APIs once the page loads.
For added security, Electron provides a "context isolation" flag for the preload script which ensures that the page could never access those messaging-channel-APIs directly. I incorrectly believed that no other messaging channel existed other than the ones documented by those APIs. Therefore I assumed that, even if a page was able to access the Electron APIs exposed in the preload script, it would not be possible to craft a message that could cause an issue -- that it would be similar to using the Web APIs we normally expose. Therefore, I did not enable the context isolation flag.
To be clear: this was a mistake on my part. The Electron team has explicitly advised all developers to use context isolation and I ignored that advice. I apologize for that. I wasn't familiar enough with the internal details of Electron to go against the advice, and that's why this exploit was possible. This was my fault.
It turns out that Electron has its own messaging channel which is not normally accessible, but which can be accessed by polluting the Function prototype chain. @imagemlt was able to use a prototype-pollution attack to access Electron's internal messaging API. They then spawned a new page with all of the web-platform protections disabled, which enabled them to freely exit the sandbox -- which they proved by spawning calculator.app.
Solving this was straight-forward: I turned on context isolation and then used Electron's contextBridge API to safely expose our Web APIs to the page. This makes a prototype-pollution attack infeasible, and closes the security hole.
Be sure to use only Beaker 0.8.9 and above to stay protected from this attack.
Going forward, I will be checking and rechecking Beaker against Electron's security guidelines. I also intend to learn about Electron's internal messaging channel and investigate whether my original assumption -- that no dangerous messages can be constructed -- can be made true.
Thanks again to @imagemlt for responsibly disclosing this issue, and also to the Electron team for the excellent tools and guidance they provide for security. If anybody has any followup questions or concerns, feel free to ask them here or by email.

would you mind me request a CVE ID for this? https://cve.mitre.org/

@imagemlt Sure thing. I'll need a little time to fulfill their requirements, so I'll keep you updated on the progress

We've assigned a CVE to this issue:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12079
Closing now as this is handled. Thanks again, @imagemlt !


[Android] No Native Control for Subtitles showing.

Bug
Platform
Which player are you experiencing the problem on:

Android

Environment info
Library version: V6 - Alpha7
Device: Pixel 4
Steps To Reproduce

Added selectedTextTrack and textTracks to the video.
Subtitles will successfully show on the front end, but no native button to disable them or choose other subtitle.

Expected behaviour

Show native android subtitles button when subtitles are available.

Reproducible sample code
selectedTextTrack={{type: 'language', value: 'en'}}
        textTracks={[
          {
            title: 'test',
            language: 'en',
            type: TextTrackType.VTT,
            uri: 'https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt',
          },
        ]}

I also believe this should be critical for release @freeboub! Thank you

@nicolaosm I agree this is an issue, but as it was not working on 5.2, this is not critical

Yes I agree, but the whole subtitles feature is not usable if we're unable to change or disable subtitles of a video. Maybe worth prioritizing.


🚀 Feature Request: Ability to emulate a public R2 bucket when developing locally with Wrangler 3

Describe the solution
Under Wrangler 2, when running locally any files you'd upload to a "local" R2 bucket would be saved in a directory with the exact filename you gave it at upload time, which meant you could very easily emulate a public R2 bucket by pointing serve at it or something similar.
Unfortunately this approach doesn't work anymore with Wranger 3 (or I guess Miniflare now?) because the filenames are all hashes now and there's an SQLite database involved as well, and as far as I can tell there's no ability to emulate a public bucket except by actually having a public bucket for real in Cloudflare.
It'd be great to have an extra flag when running wrangler dev, maybe something similar to --assets, that could specify that the R2 bucket should act as though it was public.

I'm also curious about AWS features in this scenario - is it implied by this issue that there would be a local S3 API available for buckets as well? Or would that be a separate feature?
Currently I'm getting around this by having a special dev-only worker path that just serves the files from the Workers R2 API, but I have a separate need for pre-signed URLs that it appears I won't be able to test locally with wrangler3.

This sounds good. +1 on an actual s3 api to use on local (unless i'm missing something)

But wramgler does still emulate R2 locally or what do I miss here? How is accessing the files via the local file system related to an emulation?

Ok, now I get it, apologies for the double post. You want in a second step to serve those files and not only emulate api calls to the bucket. Valid requirement. So there's nothing in wrangler doing that serving part?

Since it was removed from the Project, does it mean this is no longer considered?
Having something like wrangler r2 bucket serve <NAME> --host <IP_ADDRESS> --port 1234 would be very helpful. The current workaround is adding asset-serving functionality to a Worker which (a) would not be executed in production yet the code for it will remain in the Worker, and (b) would likely not replicate the behavior of the Public Domain connected to R2 bucket (e.g., serving the httpMetadata headers of the object) unless developer is very thorough.

Anyone from cloudflare aware of this or working on it?

+1!

would appreciate as well

+1 this would be handy

This would be super helpful

+1 yes please

Does anybody know if they are working on it?

I created a workaround little server using Hono and Bun to serve images from a local Cloudflare R2.
Here is the repo :
https://github.com/emilienbidet/cloudflare-r2-dev-server

Nice one @emilienbidet , thanks, will try it out this week!

I created a workaround little server using Hono and Bun to serve images from a local Cloudflare R2.
Here is the repo :
https://github.com/emilienbidet/cloudflare-r2-dev-server

fantastic! very helpful
thank you!

Alternative way:
A path to the stored file should be: /r2/:key for instance /r2/random-file.png
If you navigate to http://localhost:8788/r2/random-file.png:

Get the key from the path. The key is random-file.png
Finds the local file by key on R2
Returns the response(type is octet-stream) in the form of file

PS: http://localhost:8788 is a local port of wrangler dev server

export default {
    async fetch(req, env, ctx) {
        try {
            const url = new URL(req.url);
            if (url.pathname.startsWith('/r2/')) {
                // Local R2 storage
                const [path, key] = url.pathname.split('/r2/')
                console.log("Local r2: ", {path, key});
                const file = await env.R2.get(key)
                const headers = new Headers();
                headers.append('cache-control', 'immutable, no-transform, max-age=31536000');
                headers.append('etag', file.httpEtag);
                headers.append('date', file.uploaded.toUTCString());
                return new Response(file.body, {
                    headers
                })
            }

            // Otherwise, serve the static assets.
            // Without this, the Worker will error and no assets will be served.
            return env.ASSETS.fetch(req);
        } catch (ex) {
            console.error('Worker ex: ', ex)
            return new Response("Internal server error", { status: 500 })
        }
    },
}

@serikshaikamalov that's awesome, just tried it out. Here's the Hono version:
app.get('/r2/*', async (c) => {
    const key = c.req.path.substring('/r2/'.length)
    console.log("Local r2 key: ", key)
    const file = await c.env.R2.get(key)
    if (!file) throw new APIError("file not found", { status: 404 })
    const headers = new Headers()
    headers.append('etag', file.httpEtag)
    return new Response(file.body, {
        headers,
    })
})

@serikshaikamalov that's awesome, just tried it out. Here's the Hono version:
app.get('/r2/*', async (c) => {
    const key = c.req.path.substring('/r2/'.length)
    console.log("Local r2 key: ", key)
    const file = await c.env.R2.get(key)
    if (!file) throw new APIError("file not found", { status: 404 })
    const headers = new Headers()
    headers.append('etag', file.httpEtag)
    return new Response(file.body, {
        headers,
    })
})

Coool👍

cc @jonesphillip

If you're using Nuxt (and have the nitro-cloudflare-dev module installed),
// server/api/assets/[filename].get.ts
export default defineEventHandler(async (event) => {
  const { filename } = getRouterParams(event);
  const r2 = event.context.cloudflare.env;

  const file = await r2.get(filename);

  if (!file) {
    throw createError({
      status: 404,
      statusMessage: "Not Found",
    });
  }

  setHeaders(event, { etag: file.etag });

  return file.body;
});

Enjoy 💚


Refactor controllers and implementations

This PR refactors controllers and implementations. Previously, all controllers and implementations looked almost the same. The commit replaces all controllers with a single controller that handles all the types. Similarly, the PR replaces all implementations with a single one that handles all the types.
The new code relies on generics

closing this PR.
based on the offline discussion, I will prepare a new PR with a single reconciler without using generics and without any implementations - the reconciler will be responsible to sending events to the Event channel.


Add support for groups

The SDK required is older than the one I have locally. I will need to figure out how to build this to really test it locally but here is an initial draft. If you think it looks ok in general. I'll go the rest of the way.

Fixes #26

Thanks a lot for your contribution, @justinmchase !
I'll do a bit of code review...


Added sourcesContent to dist/data-grid.css.map

Hi Thomas,
I noticed the sourcesContent was missing from dist/data-grid.css.map. So I updated the corresponding scripts on package.json to include it. I also updated my local npm packages and rebuilt all my local files and found some discrepancies in the data-grid*.js.map files between yours and mine. I believe the differences are in the way the carriage return characters are generated. Yours has less \r\n than mine. Theoretically, the maps generated between yours and mine should be identical. I'm not sure if it really matter as these files are just maps.
Thanks again.

@jackkjhsu my new policy is to not generate map files anymore anyway for minified files :-) they tend to get in the way, most of the time they reference .scss files that are not deployed and therefore not very useful

Hi Thomas,
As you probably noticed that I updated the npm scripts only for the data-grid.css* files and left the min files as-is.
Thanks for merging it.


WDC slow processing of data - String type specific

I have a Client who is having issues with String type data when pulling form source. The WDC takes a very long time to process and pegs the CPU at 100%.
Excerpt: "We are loading daily time series data, with around 1,000 values per day. We have a String type column that contains a unique value per day (so about 1,000 unique values). And there is around 30 days of this data. So around 30k rows of data total.
Tableau Desktop takes around 8 minutes to process this data. This is after we have called appendRows from the WDC SDK so after our code is done with it. While it is loading, we can see that the tabprotosrv.exe process is consuming 100% of one cpu core for the full duration of the processing. So this leads me to believe all of this processing is happening within Tableau Desktop itself.
With this same 30k rows of data, if we exclude this String type column but keep the rest of the data the same (still have 1,000 values per day for 30 days), the data will process in around 5 seconds.
 If this String type column only contains a small set of values (say 50 for example) then it loads in under 10 seconds as well. So it only happens when there is a large amount of unique values per day.
Have tried this on Tableau Desktop 10.1 and 10.2. If I test this same data as a CSV import Tableau processes it relatively fast so it seems like a problem specific to WDC.
Is this expected behaviour? I can't imagine that loading 30k rows of data taking 8 minutes is normal."

Thanks for the amount of detail here, very helpful.
A few followup questions:

How wide is the data? 30k rows but how many columns per row?
When they say "If this String type column only contains a small set of values (say 50 for example)", do they mean if the column only contains a small set of unique value, but still 30k rows?
For the testing with CSV, did they import the data as an extract or just connect to it live (the default).

One thing you could try immediately on your end is sending the data back in pages, i.e. call appendRows with 100 rows, 300 times.
It does sound like there is some sort of bug in play here, but the above will help us narrow down where that is.

Here is a sample of a selection of the data:

Curve Name,Curve Type,Effective Date,Granularity,Number of Records,Curve Value
TGP-Z4 Sta-219 Price,Price,2017-01-01,Daily,1,3.222
TGP-Z4 Sta-313 Price,Price,2017-01-01,Daily,1,3.1398
TGP-Z5 200L Price,Price,2017-01-01,Daily,1,4.65
TGP-Z6 200L Price,Price,2017-01-01,Daily,1,6.1186
Transco Leidy Line receipts New Jersey Price,Price,2017-01-01,Daily,1,3.1461
Transco Zn3 Louisiana Price,Price,2017-01-01,Daily,1,3.5214
Transco Zn4 Alabama Price,Price,2017-01-01,Daily,1,3.0713
Transco Zn6 NY New York Price,Price,2017-01-01,Daily,1,3.2977
Transco-30 Texas Price,Price,2017-01-01,Daily,1,3.477

So the "Curve Name" column there is the one that will have around 1,000 unique values across the 30k rows. If that column is removed (and the rest of the data is the same) it will import into Tableau in around 5 seconds. Otherwise with it included, 8 minutes.
We can try paging the appendRows call and see what that does.

Closing for lack of response, please re-open if needed.


requests for unknown static resources should return 404

Currently if you request an unknown resource from a directory configured to serve static resources you will get back a 200 with main.html content.  This can cause unexpected failures for requests.  https://github.com/digitalbazaar/bedrock-express may also be involved in this behavior.
Test with simple request:
curl -vk -H "Accept: application/json" https://example.com/staticdir/bogus.json

Desired behavior should be to get a 404 status code if the path is a static path. May just need to call res.status(404) in bedrock-express in the static handler code and then let later handlers either clear it/change it or leave it.

Addressed by https://github.com/digitalbazaar/bedrock-express/commit/edac750249534d6d4f582d276ad67904dafdbe89 and https://github.com/digitalbazaar/bedrock-express/commit/6a9af52bc3f0ac25d23be462377c6f0d8b0d0d93.


is source for TMC2300 and TMC2300_EVAL available?

There's a binary dowload of the firmware specific for TMC2300-EVAL.
Can the source for the TMC2300 IC (registers) and evaluation board be added to github?

The TMC2300 source code is published.
Right now there is still an issue at startup - the motor receives current for ~23ms while the Landungsbruecke is still identifying the attached boards. If you are using a very small motor this may cause damage to it. To mitigate this, start the Landungsbruecke without having the power and/or motor connected.


Cannot run installed "mono" gems (ie: fastlane)

Installing works:
brew gem install fastlane --homebrew-ruby
==> Fetching fastlane from gem source
Fetching: fastlane-2.9.0.gem (100%)
Downloaded fastlane-2.9.0
Warning: Cannot verify integrity of fastlane-2.9.0.gem
A checksum was not provided for this resource
For your reference the SHA256 is: 5dbede0e3f03daa846d3f075777632989aaabd267b3ea3be3ddf37a9dc7f9503
==> /usr/local/bin/gem install ~/Library/Caches/Homebrew/fastlane-2.9.0.gem --no-ri --no-rdoc --no-wrapper --n
🍺  /usr/local/Cellar/gem-fastlane/2.9.0: 4,004 files, 62.8M, built in 1 minute 25 seconds

But executing the binary fails:
$ fastlane init
/usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- fastlane/cli_tools_distributor (LoadError)
	from /usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/Cellar/gem-fastlane/2.9.0/gems/fastlane-2.9.0/bin/fastlane:4:in `<top (required)>'
	from /usr/local/bin/fastlane:5:in `load'
	from /usr/local/bin/fastlane:5:in `<main>'

seems like a bug in how fastlane's require works.

This is a non-standard way to load gems for a binary in ruby:
https://github.com/fastlane/fastlane/blob/master/bin/fastlane#L2
The standard way is to require the gem itself.

I am not familiar with the gem require machinery. Created an issue over there to maybe get some helpful input.

@krausefx responded:

We don't use any non-standard things as far as I know.

Anyway, if it works with regular gem install shouldn't brew gem support it too?

No it wont. On a normal gem install the binary location doesn't change. With brew-gem we symlink it and it's used for /usr/local/bin ruby automatically loads the lib directory when you require a gem so there's no need to use $LOAD_PATH. I was suggesting requiring the gem in the binary like this
https://github.com/sportngin/opsicle/blob/master/bin/opsicle#L1-L6
specifically for fastlane something like:
#!/usr/bin/env ruby
require 'rubygems'
require 'fastlane'
....

Well, fastlane is not changing their code, so I guess brew gem will not be compatible then.


Issues installing basic pitch on Pyton 3.10 with tensorflow 2.9.1

Hello,
I would like to install basic-picth on a Macbook pro running Monterey, with Python 3.10, pip3 and tensorflow 2.9.1, but the tensorflow version supported are only between 2.4.1 and <2.7.0
Is there anything I can do?
Thanks, I can't wait to experiment with it!
Kindest,
Dom

Thank you so much David.
TF version 2.9 tried and I confirm it is safe. It works perfectly fine.


Event tickets: add functionality for startdate of "ticket sales"

Hello, because we have too many kids who want to participate, we open ticket sales via eventbrite always on a Sunday at 10 o'clock for the dojo of the next month. This way anyone has the same chance to get a ticket and they can not "block" reservations by reserving tickets for all the events of the year at once.
So in my opinion a real needed improvement of the ticketing system...

Hi @FDelporte! We already have this featured logged here.
If you can leave your call of support on that issue it will help us to move it from the Long Term Roadmap to the Short Term Roadmap!
I'll close this issue as it is a duplicate.


bash: npm: command not found

Description

I am running coder in Docker and it works fine. I opened my project folder and try to run ionic serve, npm i then it showing  bash: npm: command not found how to fix this ?

You have to install nodejs and npm.

You have to install nodejs and npm.

I installed both nodejs and ionic CLI on my system but still i am getting this error on coder

Coder in Docker has separate ubuntu system. So, terminal in coder is not yours terminal in pc.
Install nodejs and another dependencies into coder's terminal.

You could also launch the binary on your host to solve this problem.

Coder in Docker has separate ubuntu system. So, terminal in coder is not yours terminal in pc.
Install nodejs and another dependencies into coder's terminal.

I am new to Docker can you explain how to do that ?

You could also launch the binary on your host to solve this problem.

Can you tell me how to do that, I am new to linux and docker

Read readme file.
Download file code-server1.939-vsc1.33.1-linux-x64.tar.gz, unzip and run the command code-server.
This will run coder inside your pc, not in Docker. The terminal will be the same as in you pc.

@jishnutv Docker containers have their own isolated environment, you should supply Node.js and NPM.

Here is the coder with fresh node 10 inside
https://hub.docker.com/r/yyynnn/code-server


Error while deleteInstanceId

Application throws an error "undefined is not a function (evaluating '_reactNativeFcm2.default.deleteInstanceId()')" when try to call  "deleteInstanceId" method
react-native: 0.43.0
react-native-fcm: 6.2.3

react-native-fcm: 6.2.3 too old


Not closing luajit processes

Context of the issue.
I'm trying to build an age/gender recognition API service.
Expected behavior.
Close children luajit processes once used.
Actual behavior.
When I put it to work, it leaves an open luajit process for every request received. In a couple of minutes, RAM is full and machine goes down. I use "TorchNeuralNet" class and the "forward" method just as in the "classifier.py" demo. I tried explicitly destructing "TorchNeuralNet" instance before using it, but it didn't work.
Steps to reproduce.
It should be reproductible with a closed loop python process in which "forward" method from "TorchNeuralNet" is used.
OS and hardware information.

Operating system: Ubuntu 14.04 (bamos/openface docker image)
Torch version: same as in bamos/openface docker image
CPU architecture: x64 (GCE machine)
GPU type (if using): None

Hi, do I understand correctly that you creating a new TorchNeuralNet object for every request? I recommend using just a single one if possible because otherwise loading the Lua subprocess adds unnecessary delay to the processing time. However it also makes sense to add a destructor that kills off the subprocess like in the exit handler. I'll merge a PR if anybody adds this.
-Brandon.

Thanyou! That's a good point! I don't know how I didn't realize this could be fixed reusing the same instance. I would help on the destructor implementation if I felt confident enough with python-lua interfacing, but I'm afraid I don't have a clue...
Thanks again!

Hi, I just added a destructor that I think will now correctly kill off the subprocess when the object is destroyed. Can you check out the latest master branch and see if it works for you?

Perfect! I'll try and save 10 minutes in the next few days to run a test.

@bamos Destructor doesn't work for me at all, because it's not reliable for resource management.
In my case it's necessary to create a TorchNeuralNet object per task (to preserve scalability and have Torch subprocess only when it's needed). And because destructor doesn't have deterministic behavior, I ended up with zombie processes several times.
I've created a pull request #223 which allows to use TorchNeuralNet object as context manager and explicitly kill the subprocess.
Can you review it?

TorchNeuralNet class creates a zombie process and does not close the pipe.
An error occurred when executing the following code
while True:
  with TorchNeuralNet(model=model) as net:
      net.forwardPath(pathToTheFile)

error
    r, w = os.pipe()
OSError: [Errno 24] Too many open files

ps ax

17676 s002  Z+     0:00.00 (luajit)
17686 s002  Z+     0:00.00 (luajit)

It will execute self.p.kill () with the __exit__ function etc, but I think that it is caused by not executing os.waitpid and pipe close.
os.waitpid and pipe close are executed by Popen.communicate.
I think that it is better to execute p.communicate () after p.kill () like https://github.com/cmusatyalab/openface/blob/master/openface/torch_neural_net.py#L171


What's up with 1.8.6 vs. <IP_ADDRESS>?

We recently upgraded to the 1.8.6 package. <IP_ADDRESS> was published but there are no commits in git or release notes. I see that 1.8.6 was unlisted on nuget.org too.
What's up with <IP_ADDRESS>?
I ran them both through ildasm and 1.8.6 had its assembly version set to 1.8.5 and <IP_ADDRESS> had it set to 1.8.6. There is a lot of other stuff going on in the diff but at least some of is just noise from non-deterministic builds. It might be nice to add <Deterministic>true</Deterministic> to the csproj files for this library so that it's easier to diagnose these things in the future :)

Presumably the reason for the <IP_ADDRESS> release was to fix the version number.


PF-167: Show release notes versions even when there is no changelog

In React FE application we are missing changelog field during version creation.
Show description in release notes
versions:

published documentation example:

Closed because FE sent incorrect field, was fixed there so now appropriate release notes changelog data will be available


Update card.css

Pull Request Type
What kind of change does this PR introduce?
[ ] Solved an issue/task
Behavior - i just added CSS to one task of CSS
Other information

The flipping effect seems not to be working.

Changes Done sir now card is flipping

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out my other projects. Just click here to find more. These projects contain real issues that you can help resolve. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


Add output messages with the asserts

In order to resolve #163

There are 2 strange tests in split_data and split_data_advanced (called in main.py):
https://github.com/SubstraFoundation/distributed-learning-contributivity/blob/93212d1970965fe670999c6438bd1ab5140419db/scenario.py#L487-L488
This seems to be a mistake: self.minibatch_count is the number (the user chooses it in config.yml) of minibatch of data: 10? 20?
and (min(self.amounts_per_partner) * len(x_train)) is the size of the smallest dataset (from the partner with the smallest proportion of data over the whole dataset)
I think that we want to make sure that the size of a minibatch len(x_train) / self.minibatch_count is lower than the size of the smallest dataset
So I suggested writing instead: assert self.minibatch_count <= (min(self.amounts_per_partner) * len(x_train))
https://github.com/SubstraFoundation/distributed-learning-contributivity/blob/93212d1970965fe670999c6438bd1ab5140419db/scenario.py#L385-L386
This is exactly the same, so I suggest the same change.
Moreover, shouldn't we try to factorize all these tests in one new function?

I think this test is still valid: we want to check if the number of minibatch is smaller than the number of data samples of one partner. For instance, we don't want to be in the the situation where we have minibatch_count = 100 and one partner that has only 50 data samples.

Topic 1

I think this test is still valid: we want to check if the number of minibatch is smaller than the number of data samples of one partner. For instance, we don't want to be in the the situation where we have minibatch_count = 100 and one partner that has only 50 data samples.

I confirm that it was my intent when I wrote this assert :smiley:

Topic 2

So I suggested writing instead: assert self.minibatch_count <= (min(self.amounts_per_partner) * len(x_train))
https://github.com/SubstraFoundation/distributed-learning-contributivity/blob/93212d1970965fe670999c6438bd1ab5140419db/scenario.py#L385-L386
This is exactly the same, so I suggest the same change.

In your suggestion @GauthierGar you suppose that the Partner object has already been instantiated for each partner, and that the original dataset has already been split among them. So the test your propose could work, but it should be placed downstream, at the end of the split_data... functions (split_data() and split_data_advanced()).
It would be an interesting one, not exactly the same actually than the original test. When data are split in the 'advanced' way, in many cases not all samples from the original dataset are distributed among partners. So we might encounter cases where the first test passes, but this second one don't.

Topic 3

Moreover, shouldn't we try to factorize all these tests in one new function?

Do you mean all asserts? That is a good question, I don't what is the best practice here / the most Pythonic way to handle that: all asserts in one place, or asserts along the code as close as possible to the particular topic they handle? @natct10 @RomainGoussault

Moreover, shouldn't we try to factorize all these tests in one new function?

We can do that, but we should keep in mind that it's is easier to read if the assert statements are close to variables they are trying to check.

Moreover, shouldn't we try to factorize all these tests in one new function?

We can do that, but we should keep in mind that it's is easier to read if the assert statements are close to variables they are trying to check.

I agree with you @RomainGoussault.
Thank you @GauthierGar for the error messages with the assertions, this is way cleaner!

I will use this branch to add tests focusing on the config.yml to solve #184

I will use this branch to add tests focusing on the config.yml
to solve #184

Great! You might be interested in this PR then: https://github.com/SubstraFoundation/distributed-learning-contributivity/pull/160

Great! You might be interested in this PR then: #160
Is it something that should be solved using unit testing?
The aim is to raise an error before the computation if there is an unrecognized parameter in the .yml
I thought that unit testing was about making automatic tests of the effectiveness of each function, not about checking if the parameters are valid.

Great! You might be interested in this PR then: #160

Is it something that should be solved using unit testing?
The aim is to raise an error before the computation if there is an unrecognized parameter in the .yml
I thought that unit testing was about making automatic tests of the effectiveness of each function, not about checking if the parameters are valid. @natct10

I think you are right @GauthierGar, but I let @natct10 confirm that it is better practice to have proper unit tests on one side, and controls like this one on the other side.

Great! You might be interested in this PR then: #160

Is it something that should be solved using unit testing?
The aim is to raise an error before the computation if there is an unrecognized parameter in the .yml
I thought that unit testing was about making automatic tests of the effectiveness of each function, not about checking if the parameters are valid. @natct10

I think you are right @GauthierGar, but I let @natct10 confirm that it is better practice to have proper unit tests on one side, and controls like this one on the other side.

You are right, it would be better to test the validity of the config file here and raise errors as you did @GauthierGar, which is different from unit testing.

I have implemented a new feature: the user can use a part < 100% of the dataset in the basic split option. (your last comment about the PR #178 @bowni )
We keep random element of x_train, this could be problematic with the stratified mode if one label is push out of the data.
This could be implemented too in the advanced split option, but it will be more complex

I have implemented a new feature: the user can use a part < 100% of the dataset in the basic split option. (your last comment about the PR #178 @bowni )
We keep random element of x_train, this could be problematic with the stratified mode if one label is push out of the data.
This could be implemented too in the advanced split option, but it will be more complex

Excellent initiative! I'll look into it later today or tomorrow @GauthierGar

I think that this PR is ready to be merged,
I have removed a feature (the one that keep a little part of the dataset, <100%), I will add it in another PR as discussed this morning.


Possible solution for Arch ViewModel dynamic parameters

After seeing Jake's presentation on this library at DroidCon, I was hoping that the proposed solution will solve the problem of passing dynamic parameters to Android Architecture Components ViewModel that is discussed on several places over the internet, originally probably here https://github.com/googlesamples/android-architecture-components/issues/207
Since ViewModel shouldn't be injected directly to a client as Presenter is in the examples of this library and Jake's talk, all I could come up with was double factories, the assisted factory for creating ViewModelFactory and then then ViewModelFactory to have the system lazily create the ViewModel.
Can someone see a better solution or would it require a specific fork of this library to auto generate this extra ViewModelFactory?
Ideally I would see the same solution as in Jake's presentation. No manual creation of ViewModel and no manual parameter passing, only the dynamic params to Factory create method.
My example:
The ViewModelFactory and "ViewModelFactoryFactory"
class WordDetailViewModelFactory @AssistedInject constructor(
    private val repository: WordRepository,
    @Assisted private val argument: WordDetailScreenArg
) : ViewModelProvider.Factory {

    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return WordDetailViewModel(repository, argument) as T
    }

    @AssistedInject.Factory
    interface Factory {
        fun create(argument: WordDetailScreenArg): WordDetailViewModelFactory
    }
}

The ViewModel
class WordDetailViewModel(
    private val repository: WordRepository,
    argument: WordDetailScreenArg
) : ViewModel() {

    val wordDetail: LiveData<Word> = repository.word(argument.word)

    fun onDeleteWordClicked() {
        wordDetail.value?.let {
            repository.deleteWord(it.word)
        }
    }
}

Injection
@Inject
lateinit var viewModelFactory: WordDetailViewModelFactory.Factory;

override fun onAttach(context: Context?) {
    super.onAttach(context)

    val arguments: WordDetailScreenArg = ...
    Injection.appComponent.inject(this)

    viewModel = ViewModelProviders.of(this, viewModelFactory.create(arguments))[WordDetailViewModel::class.java]

}

Edit: looks like @hansenji has a solution at https://github.com/hansenji/ViewModelInject

You might want to check @InflationInject @InflationModule which is used to avoid that another level of factories (LayoutInflator.Factory).

@mtiidla have you found more elegant solution to this?

@mtiidla have you found more elegant solution to this?

@eerikk No, unfortunately not. I have recently switched projects and am currently not using Dagger2, but Koin instead. Koin solves this exact issue as you can see here. However, I personally care much more about Dagger2 and I am planning to look into the LayoutInflater Factory solution mentioned by Ethan1983, but haven't gotten around to it yet.

My solution was to have a callback on ViewModel creation in ViewModelFactory:
https://gist.github.com/alashow/67cc52c606ddc7637e75185673b7f9a6

My solution was to have a callback on ViewModel creation in ViewModelFactory:
https://gist.github.com/alashow/67cc52c606ddc7637e75185673b7f9a6

Thanks for proposing your solution, however it is not solving the problem. The main idea is to avoid an init method on the viewmodel and use constructor to injection arguments. Otherwise we could very well write and init method on every viewmodel and just call it (which you have just abstracted away).

Yeah, the reason why I abstracted it is to init the ViewModel on creation.

I made https://github.com/evant/injectedvmprovider to try to deal with this, it lets you skip the ViewModelFactory. While we aren't currently using it with AssistedInject, we are using it with manual factories and it's working pretty well. Your example would be:
The ViewModel
class WordDetailViewModel  @AssistedInject constructor(
    private val repository: WordRepository,
    @Assisted argument: WordDetailScreenArg
) : ViewModel() {

    val wordDetail: LiveData<Word> = repository.word(argument.word)

    fun onDeleteWordClicked() {
        wordDetail.value?.let {
            repository.deleteWord(it.word)
        }
    }

    @AssistedInject.Factory
    interface Factory {
        fun create(argument: WordDetailScreenArg): WordDetailViewModel
    }
}

Injection
@Inject
lateinit var viewModelFactory: WordDetailViewModel.Factory;

override fun onAttach(context: Context?) {
    super.onAttach(context)

    val arguments: WordDetailScreenArg = ...
    Injection.appComponent.inject(this)

    viewModel = InjectedViewModelProviders.of(this).get(viewModelFactory, f -> f.create(arguments))
}

Well with this approach are we not gonna end with each individual ViewModel mapped to its own ViewModelFactory. Thus, we are sacrificing the cost of loosing a generic ViewModelFactory. Please correct me if I misunderstood.

https://github.com/tfcporciuncula/dagger-journey

We've started to use this kind of solution in our project. Dagger helps us out here 👇

Generic code that lets us inject into Fragment and ViewModel. Important part here is the code inside companion object. We make fragment argument available for ViewModel.

            }
        }
    }

}

This way we can inject the param simply to our ViewModel
class ExampleViewModel @Inject constructor(
    private val exampleString: String
): ViewModel{}

If you have multiple parameters with same type, you can use @Named annotation to prevent type conflicts. 👇
            @Provides
            @Named(ExampleFragment.EXAMPLE_STRING)
            @JvmStatic
            fun providesExampleParam(fragment: ExampleFragment): String {
                return fragment.requireArguments()
                    .getString(ExampleFragment.ARG_EXAMPLE_STRING)!!
            }

...and now you can simply access it from ViewModel
class ExampleViewModel @Inject constructor(
    @Named(ExampleFragment.EXAMPLE_STRING) private val exampleString: String
): ViewModel{}

This library uses Assisted Inject and SavedStateHandle to pass arguments into your viewmodel
https://github.com/hansenji/ViewModelInject.

This functionality is going to be covered by the upcoming Hilt tool in Jetpack which integrates Dagger with view models and work manager.


Add function 'roundToNearest'; parameters: 'num1', 'num2'

Add a function roundToNearest which rounds num1 to the nearest num2. For example, if you do (round 90 to the nearest 100) it will return 100. This would be a very useful function for creators because instead of using (calculate (floor of (calculate(calculate(x / y) + 0.5) ) * y)) they can just do (round x to the nearest y).

why it's not accepted, can someone please tell me why?


Support for River 2 Max

Would be great to see this device working with Home assistant in the future

+1

+2

I dont know much about programming but this would be cool to get into Home assistant...
https://github.com/berezhinskiy/ecoflow-mqtt-prometheus-exporter

+1

+1

I've implemented basic support for Delta 2 and River 2 Max.

Thank you.  Works great so far.  Several entities created as described and seem to update correctly.  Thanks again!

I cant connect...enter river 2 max ip and see a continuous loading...
My River 2 Max firmware is <IP_ADDRESS> ; WIFI version <IP_ADDRESS>

River 2 Max is also not working for me. All updates are done.
As workaround I use the other cloud integration as workaround.

Working fine here. You just need to restart the Integration every now and then (around twice a week here) to get new stats. And this Integration doesnt work offline it connects to ecoflow server.


Move constants into modules

As per the pattern established between and #597 and #599 and the discussion around it, this PR adds modules for the related groups of constants for AWS:

ec2.InstancePlatforms
ec2.InstanceTypes
ec2.Tenancies
iam.ManagedPolicies
iam.Principals

The existing constants are left alone, but marked with @deprecated in the tsdoc, to be removed at some future time.

Hi there!  Could i be included on these reviews?  Thanks!


Add google cloud storage (gcs) support

This PR includes:

Minimal GCSFileSystem
GCSReadFile, GCSWriteFile
Extends CircleCI to install/run the GCSFileSystem adapter. Includes a new job  linux-gcs-build as well as setup_adapters.sh script to download google-cloud-cpp storage and its dependencies.
Basic testing of GCSUtils
tests of the GCS file system read/write functionality using gcs emulator

@majetideepak @kgpai @Yuhta
Hi all, I have have added some tests, fixed issues raised in the previous code review. I am working on adding my company's CLA - this should be done soon. I would appreciate your review so I can close any issues while CLA requirement is being resolved.
Thanks

@ecopty Thanks for fixing the code review comments and adding tests. I will make another pass today.

@ecopty can you address the last couple of comments. This should be ready for merge.

@ecopty can you address the last couple of comments? This should be ready for merge after that.

Sorry for the delay with this. @ecopty had her sabbatical at intel and now will be leaving her team. I've been tasked with getting this PR accross the finish line. I don't have a lot of context or knowledge of this project, but I think I've addressed the review comments. Please take a look. I do see that the MacOS build is failing; please let me know if it's something wrong with this PR. Thank you!

@majetideepak Hi, I just wanted to ping you directly on this to make sure you saw the updates :) thanks!

@ecopty we (@tigrux and I) are joining this effort of adding support of gcs to Velox, would it be easy for you to grant us access in your branch? this in order to keep the advantage of all the history that is recorded on this PR. Other option can be that we fork the project, add your changes (you name would be set as the first contributor) and we may need to open a new PR. Please feel free to reach out for any further clarifications.
@majetideepak  and @Mionsz, we're just joining the effort, it will take us a few weeks to catch up with the project and changes but we'll come back with updates. Thanks for the review.


Local network discovery

Probably a new tab, similar to 'Network' vs 'Friends'.

e0cfa6f, 2ba8ed5, 4f8be2c


Position dialog in certain location

Is it possible to absolutely position a dialog in a certain position, such as right below the button that fires the dialog?
The idea is that it looks more like a menu for that button. Or alternatively, do you know about any other framework suitable for my use case?

That’s exactly what we built Tether (GitHub, Docs) and Drop (GitHub, Docs) for. :)


iOS - No longer getting helpful commands or reloading / hot reloading options after running flutter-run in a new app.

Steps to Reproduce
flutter create myapp
flutter run

Logs
Launching lib/main.dart on iPhone 7 in debug mode...
Flutter Doctor
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
• Flutter at /Users/naderdabit/bin/flutter
• Framework revision 701d534ba9 (11 days ago), 2017-09-12 14:01:51 -0700
• Engine revision 31d03de019
• Tools Dart version 1.25.0-dev.11.0
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /Users/naderdabit/Library/Android/sdk
• Platform android-25, build-tools 25.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.0, Build version 9A235
• ios-deploy 1.9.2
• CocoaPods version 1.2.1
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] Connected devices
• iPhone 7 • 0B9AFAA5-1D2B-4AD4-8448-C93DBBB83A8D • ios • iOS 11.0 (simulator)

Update: This is just happening on iOS, Android is still working fine for me.

+1, this started happening after I updated to Xcode 9.  It repros on the latest alpha channel, but not on the master channel.

+1

+1

Ok, so installing a simulator at version 10.3.1 fixed this for now, just make sure you run on the 10.3.1 simulator. This issue seems to only be happening in the version 11.0.

@cbracken we've updated support for XCode 9, yes? Do we expect this to work now?

Yep - alpha's been rolled and includes all the Xcode 9 support. Please re-open if you're still encountering issues after a flutter upgrade.

Awesome, thanks!