text:
Policy Report Creation Error: "" namespace not found

Describe the bug
When Falcosidekick attempts to create Policy Reports, it encounters errors indicating that the namespace is not found, particularly when dealing with resources that might not be associated with a Kubernetes namespace, such as node OS-related events.
2024/03/01 18:10:15 [INFO]  : PolicyReport - Policy Report falco-policy-report-78d6f447 in namespace falco has been updated
2024/03/01 18:10:17 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:17 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:18 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:18 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:18 [INFO]  : Teams - Post OK (200)
2024/03/01 18:10:18 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:18 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:19 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:19 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:19 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:19 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:19 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:20 [ERROR] : PolicyReport - Can't create Policy Report namespaces "<nil>" not found in namespace <nil>
2024/03/01 18:10:20 [INFO]  : Teams - Post OK (200)

How to reproduce it
The issue occurs during the Policy Report generation process, particularly when events not associated with a Kubernetes resource (like node OS events) are processed. Exact reproduction steps are unclear and need further investigation.
Expected behaviour
Falcosidekick should handle cases where no specific Kubernetes namespace is associated with an event more gracefully. If no namespace can be identified, it could default to creating these policy reports in the Falco namespace or handle the error without repeatedly attempting to create a report.
Possible solution
A potential solution could involve checking if the namespace is nil and, if so, assigning a default namespace or skipping the report generation with an appropriate log message that indicates the action taken.
Screenshots

Environment

Falco version:

helm chart version: 4.2.2
app version: 0.37.1

Falcosidekick version:
helm chart version: 0.7.11
app version: 2.28.0
Installation method: Kubernetes, Helm

Additional context
This issue seems to arise when Falcosidekick processes events that do not map directly to a Kubernetes resource. Improving error handling for such cases could enhance Falcosidekick's robustness and prevent log flooding with error messages.

This issue can linked with the #803, I will work on both at the same time.

Will be fixed in the upcoming 2.29

repo: falcosecurity/falcosidekick


text:
update(userspace)!: support state access and event parsing in plugin API

What type of PR is this?
/kind design
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
This follows up the work started with #1078. Now that libsinsp provides a standardized way of interacting with its internal state tables, we can update the plugin API to leverage it. This PR contributes to the plugin system with the following:

Refactor some types to be more robust and less ambiguous (e.g. having a platform agnostic representation for booleans)
Create APIs for the plugin to do inversion of control and invoke methods of its owner (e.g. an inspector)
Create APIs for the plugin to access an inspector's state tables for read, write, and discovery purposes

Plugins are also able to define their own state tables and register them in the inspector
Cross-plugin state table access is supported

The field extraction capability has been extended for leveraging the state access APIs
A new capability has been added for "parsing events", which hooks into the event parsing phase of libsinsp, with access to the state tables API as well
Tests, tests, and examples

Which issue(s) this PR fixes:
Fixes #991
Fixes https://github.com/falcosecurity/plugins/issues/85
Special notes for your reviewer:
700+ LOC are dedicated to tests.
Does this PR introduce a user-facing change?:
update(userspace)!: support state access and event parsing in plugin API

Integrated all the naming suggestions from @leogr (🙏 ) and rebased on top of master.

LGTM label has been added.  Git tree hash: e87156c3d823deb65865802492fab70eb1c72fe5

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, jasondellaluce, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,jasondellaluce,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

source: gharchive/pull-request

authors: jasondellaluce poiana

repo: falcosecurity/libs

license_type: permissive

license_source: github-api


text:
JNCronParserI18N_zh.properties文件中文乱码

JNCronParserI18N_zh.properties文件，用idea打开，编码是UTF-8，中文显示会乱码。

之前是GBK，我给转成UTF8

source: gharchive/issue

repo: fangjinuo/langx-java


text:
Bgff file with multi "LOCUS", extract only the first one.

Bgff file with multi "LOCUS", extract only the first one.
Example file on the link (ftp://ftp.ncbi.nlm.nih.gov/refseq/release/bacteria/bacteria.1.genomic.gbff.gz).
How to get around this problem?
I need the .json file to integrate into a pipeline. Thanks!

@lisboazootec, should be fixed by the above commit. it took about 1 min 51 sec to convert the gbff file on my desktop, output is a 410MB json file. Let me know if you see any problem with this.

authors: fangq lisboazootec


text:
Not IE compatible

Hello,
Thanks to contribute to create a better world for developers. Your project is certainly the best revelation of the year and a big source of inspiration for every front-end developers. I have put it in production in my company, it works great and customers gave us really good feedback.
But I have a problem, it seems to not be compatible for IE6, did you plan to fix this problem ?

We have our hands on it actually but it takes time to fix it ;)

Yeah, supporting IE6 is essential. As FapFap is universal and for everyone we should fix this issue as soon as possible.

authors: Bastien7 ClementGautier juliensnz

repo: fapfapjs/fapfapjs

license: mit

license_source: bigquery


text:
Strange things...

I used your script and strange things are happening here.

Windows Wallet on startup - why? x1

Seconds on timer - why? x2

Windows sandbox install - why? x3

ribbon view on default - why? x4

Powershell folder in documents - okey let's skip

it's only a few minutes after the reboot, so there could be more. 🙉
Script version:

OS informations:

I do not even know what are you writing about. You have execute the 3300 lines script without releiziling what it does on every line of script.
Before executing you NEED to know what you are executing and comment out every line you do not what to be sexecuted.

license: MIT


text:
How to append icon names instead of replace all?

with this option  icons: [], // list of icon objects [{title:String, searchTerms:String}]. By default, all Font Awesome icons are included.
the awesomefont is replaced by the custom icon font inside the icons[] option, how to append the custom icons to the list of awesomefont? #

You can merge your custom icons list (new_icons) with the default icons, like this:
 icons: typeof new_icons != 'undefined' ?  $.merge(new_icons , $.iconpicker.defaultOptions.icons) : null,

I'm using this to prepend our custom icons:
iconlist.js
export default [
  'fa-none',
]

picker.js
import iconlist from './iconlist';
$el.iconpicker({
  icons: [
    ...iconlist,
    ...$.iconpicker.defaultOptions.icons,
  ]
});

var addIcons=[];
addIcons.push({
title:"fas fa-poo",
searchTerms: []
});
$.merge($.iconpicker.defaultOptions.icons,addIcons)

authors: A1rPun diegomagikal jsAdore mindsoul

repo: farbelous/fontawesome-iconpicker


text:
Rename &SELFDESTRUCT and make it unconditional.

Previously this only did emulation in debug mode, but in preparation for
supporting multiplexed interactions, we want to make this unconditional,
and never use a real SELFDESTRUCT instruction.

Actually, if we hope to ever support the single-contract backend again, we should probably offer both kinds of primitives, rather than a single one. Possibly in two separate files.

Perhaps we should just rename the debug: parameter, and in glow we'll
hard-code it to #t unless we want to switch back?
Quoting François-René Rideau (2021-05-23 11:10:04)

Actually, if we hope to ever support the single-contract backend again,
we should probably offer both kinds of primitives, rather than a single
one. Possibly in two separate files.
--
You are receiving this because you authored the thread.
Reply to this email directly, [1]view it on GitHub, or [2]unsubscribe.
Verweise

https://github.com/fare/gerbil-ethereum/pull/36#issuecomment-846578180
https://github.com/notifications/unsubscribe-auth/AAGXYPVLUAAZGEI5H2R6AHTTPELEZANCNFSM45LBLN6Q

Alternatively, since "non-debug" case is just a selfdestruct instruction, do we really need a wrapper for that case at all? It seems like there's a failure of separation of concerns here when we add per-interaction selfdestruct:

Whether there's debug hacks going on
Whether the selfdestruct is per-interaction or per-contract.

It seems like (2) should not depend on a debug flag, since these are actually very different things.

Ack, this is broken anyway; I tried to tease it apart from other changes I had in my working directory, but it's got a reference to the balance variable. I'm going to close this, I may or may not open something similar later.

authors: fare zenhack

repo: fare/gerbil-ethereum


text:
fix(pages): fix layout and ogp

hi @EdamAme-x  why do you want to disable the StarrySky component?

hi @EdamAme-x  why do you want to disable the StarrySky component?

Because the image was out of date. (Cannot see) However, this is temporary. That is why the import state is commented out. It will need to be fixed in the future.

hi @EdamAme-x  why do you want to disable the StarrySky component?

Because the image was out of date. (Cannot see) However, this is temporary. That is why the import state is commented out. It will need to be fixed in the future.

It's okay. I can take a look at this question later.

authors: EdamAme-x ErKeLost


text:
updated japanese

Hello!

Thank you very much!

authors: farmerbb naofum

repo: farmerbb/Taskbar


text:
RuntimeError: imag is not implemented for tensors with non-complex dtypes.

Unable to import:  from fastai2.vision.all import *
Logs:

RuntimeError                              Traceback (most recent call last)
 in
----> 1 from fastai2.vision.all import *
~/.local/lib/python3.8/site-packages/fastai2/vision/all.py in
----> 1 from ..basics import *
2 from ..callback.all import *
3 from .augment import *
4 from .core import *
5 from .data import *
~/.local/lib/python3.8/site-packages/fastai2/basics.py in
----> 1 from .data.all import *
2 from .optimizer import *
3 from .callback.core import *
4 from .learner import *
5 from .metrics import *
~/.local/lib/python3.8/site-packages/fastai2/data/all.py in
----> 1 from ..torch_basics import *
2 from .core import *
3 from .load import *
4 from .external import *
5 from .transforms import *
~/.local/lib/python3.8/site-packages/fastai2/torch_basics.py in
2 from .imports import *
3 from .torch_imports import *
----> 4 from .torch_core import *
5 from .layers import *
~/.local/lib/python3.8/site-packages/fastai2/torch_core.py in
284             setattr(TensorBase, fn, get_f(fn))
285
--> 286 _patch_tb()
287
288 # Cell
~/.local/lib/python3.8/site-packages/fastai2/torch_core.py in _patch_tb()
280     for fn in dir(t):
281         if fn in skips: continue
--> 282         f = getattr(t, fn)
283         if isinstance(f, (MethodWrapperType, BuiltinFunctionType, BuiltinMethodType, MethodType, FunctionType)):
284             setattr(TensorBase, fn, get_f(fn))
RuntimeError: imag is not implemented for tensors with non-complex dtypes.

Are you using PyTorch 1.6?

Yes

I cannot reproduce this error on my system. What platform or OS are you using? How are you installing fastai2?

I used pip install , Ubuntu 20.04 , pip 20.2, I reinstalled with pip and the error went away sorry I might be on a previous version

authors: muellerzr tkrsh


text:
Reestructuring imports

The imports of this submodule are following now the format of the rest

The previous changes are incorrectly.


text:
Unbundle the results for comparisons to make sense

@cagataycali the latest version is nice, but there is an issue since the benchmark results are bundled in the npm package: comparing frameworks doesn't always make sense since the results are dependent on the machine. For example, take the following:
$ benchmark
? Do you want to run all benchmark tests? No
? Select packages hapi
✔ Results saved for hapi
$ benchmark compare
? What's your first pick? hapi
? What's your second one? hapi
Both are awesome but hapi is faster than fastify

It says Hapi is faster than Fastify because my machine can run Hapi faster than whatever machine generated the bundled results could run Fastify.

You are right, test depends on machine. I think check exist or not but I did not cause, who don't have time for this etc. But your case is critical. Thanks a lot🎉

authors: cagataycali dougwilson

repo: fastify/fastify-benchmarks


text:
Files ignored in .xcovignore, but appearing in coverage report

Hi @nakiostudio
Like statet in the title, one of my team mates discovered something odd: files which were added into .xcovignore were also ignored during the coverage calculation (I can see this in the console which files were ignored), but they appear in the .html coverage report (and everywhere is 0%). Is this by intent?

@nakiostudio I'm facing the same issue, any plan to open the PR? Thanks.

+1

Any update on this?

Hi, any news on this? :)

Hello, any updates this is still happening????

authors: BrandonWalker88 KacperCzapp dai-cb dogo sauvage7 wtyeh

repo: fastlane-community/xcov


text:
Containerize fastlane.ci

It would be really nice to have a docker image or something that we could deploy.
It's not a requirement since we expect most people to deploy directly on a Mac. This only benefits fastlane.ci running for fastlane.ci or any other project that doesn't require a Mac (for Xcode, and other build tools)

Hi @taquitos, I created a PR (#619) to address what you are mentioning.
Eventually we could push the image to the DockerHub and/or supporting for development deployment too (which in my opinion is something nice to have in the future: not having to install specific version of Ruby and gems and still be able to contribute to the project).

Yey!

authors: adellibovi taquitos

repo: fastlane/ci


text:
match does not select team_id since 2.157.3

I think this commit caused the issue:
https://github.com/fastlane/fastlane/commit/00863a5c305605c4eb14d70ef34a03807d1f049a
I am using match the same way, but since 2.157.3 it goes in error as i call it from jenkins and am not able to select the team by user input.
The error I get is:
_Verifying that the certificate and profile are still valid on the Dev Portal...
The current user is in 7 teams. Pass a team ID or call select_team to choose a team. Using the first one for now.
Multiple teams found on the Developer Portal, Your Terminal is running in non-interactive mode! Cannot continue from here.
Please check that you set FASTLANE_TEAM_ID or FASTLANE_TEAM_NAME to the right value.
Available Teams:
...
Multiple Teams found; unable to choose, terminal not interactive!_
Please fix this asap.
Thank you

We are also encountering this bug. Pls. note that you can work it around, if you set the FASTLANE_TEAM_IDenv variable.

Also, I think this is a duplicat of #17153

Looking into! Duplicate of #17153. Sorry, fam 😔

authors: TewWe joshdholtz sneps85

repo: fastlane/fastlane


text:
Issue 9d4acb17ddb18dba04990af308e0ba0e - Error with Slack messaging and Unusual Character?

New Issue Checklist

[ x ] Updated fastlane to the latest version
[ x ] I have read the Contribution Guidelines

Issue Description
Had an error when sending Slack message (I think?). All steps completed successfully and then I had an error / crash when sending the Slack command.
I see ":beta:Symbol" mentioned in the crash reporter. This app's bundle display name includes the β symbol in it; I wonder if this is related? Not sure if this is a problem in Fastlane's tools or Swift's messaging API?
Complete output when running fastlane, including the stack trace and command used
[14:27:08]: -------------------
[14:27:08]: --- Step: slack ---
[14:27:08]: -------------------
[14:27:08]: Successfully sent Slack notification
[14:27:08]: Variable Dump:
[14:27:08]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta", :GIT_REPO_WAS_CLEAN_ON_START=>true, :BUILD_NUMBER=>"148", :VERSION_NUMBER=>"1.5.0", :IPA_OUTPUT_PATH=>"[MY_PATH]", :DSYM_OUTPUT_PATH=>"[MY_PATH]", :XCODEBUILD_ARCHIVE=>"[MY_PATH]"}
[14:27:08]: undefined method `+' for :beta:Symbol

+------+-------------------------+-------------+
|               fastlane summary               |
+------+-------------------------+-------------+
| Step | Action                  | Time (in s) |
+------+-------------------------+-------------+
| 1    | default_platform        | 0           |
| 2    | cocoapods               | 21          |
| 3    | ensure_git_status_clean | 0           |
| 4    | increment_build_number  | 1           |
| 5    | get_version_number      | 0           |
| 6    | get_build_number        | 0           |
| 7    | gym                     | 364         |
| 8    | pilot                   | 1790        |
| 9    | clean_build_artifacts   | 0           |
| 10   | commit_version_bump     | 0           |
| 11   | slack                   | 0           |
+------+-------------------------+-------------+

[14:27:08]: fastlane finished with errors
Successfully submitted a crash report. If this is a problem with one of the tools specifically,
please submit an issue on GitHub and attach the following number to it: '9d4acb17ddb18dba04990af308e0ba0e'
The crash report has been stored locally '/tmp/sentry_9d4acb17ddb18dba04990af308e0ba0e.json'
Fastfile:42:in `block (2 levels) in parsing_binding': [!] undefined method `+' for :beta:Symbol (NoMethodError)
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/runner.rb:56:in `call'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/runner.rb:56:in `block in execute'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/runner.rb:46:in `chdir'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/runner.rb:46:in `execute'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/lib/fastlane/command_line_handler.rb:30:in `handle'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/bin/fastlane:38:in `block (2 levels) in run'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane_core-0.43.0/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/bin/fastlane:168:in `run'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/fastlane-1.83.0/bin/fastlane:174:in `<top (required)>'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/bin/fastlane:23:in `load'
	from /Users/timcamber/.rbenv/versions/2.0.0-p247/bin/fastlane:23:in `<main>'

Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
default_platform :ios

platform :ios do
  version = nil
  build_number = nil
  tag_string = nil

  before_all do
    ENV["SLACK_URL"] = SLACK_URL

    cocoapods

    ensure_git_status_clean # Make sure Git working directory is clean
    increment_build_number  # Increment Build Number

    version = get_version_number(xcodeproj: MY_PROJECT_FILE)
    build_number = get_build_number(xcodeproj: MY_PROJECT_FILE)

  end

  desc "Submit a new Alpha Build to Apple TestFlight"
  lane :alpha do
    gym(scheme: "[MY APP NAME] α")
    pilot
  end

  desc "Submit a new Beta Build to Apple TestFlight"
  lane :beta do
    gym(scheme: "[MY APP NAME] β")
    pilot
  end

  desc "Deploy a new version to the App Store"
  lane :appstore do
    gym(scheme: "[MY APP NAME] App Store") # Build your app - more options available
    deliver(force: true)
  end

  after_all do |lane|
    clean_build_artifacts
    commit_version_bump
    tag_string = lane + "/" + version + "(" + build_number + ")"
    add_git_tag(tag: tag_string)

    push_to_git_remote
    clean_build_artifacts
    reset_git_repo

    slack(
      message: "Successfully deployed update to [MY APP NAME]"
    )
  end

  error do |lane, exception|
    slack(
      message: exception.message,
      success: false
    )
  end
end

Environment
fastlane version (run fastlane -v):
fastlane 1.83.0
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?
No
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)?
rbenv

Hi @timcamber! Hope you are doing well. I wanted to know if you've tested without this symbol? That'll help us track down the cause of this. Thanks!

authors: TKBurner timcamber


text:
Error using gym (You passed invalid parameters to 'gym', Could not find option 'provisioning_profile_path')

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I have read the [Contribution Guidelines]

Issue Description
Hi!. Since yesterday, there is an error when I try to compile:
19:21:38: --- Step: gym ---
19:21:38: -----------------
19:21:38: You passed invalid parameters to 'gym'.
19:21:38: Check out the error below and available options by running fastlane action gym
[19:21:39]: Liberando lock
[19:21:39]: ERROR in fastlane itunes_upload for the app volvoxc60
[19:21:39]: --------------------------
[19:21:39]: --- Step: notification ---
[19:21:39]: --------------------------
+-----------------------------+-----------------------------------------------------------------------------+
|                                               Lane Context                                                |
+-----------------------------+-----------------------------------------------------------------------------+
| DEFAULT_PLATFORM            | ios                                                                         |
| PLATFORM_NAME               | ios                                                                         |
| LANE_NAME                   | ios createapp                                                               |
---------+
[19:21:39]: Could not find option 'provisioning_profile_path' in the list of available options: workspace, project, scheme, clean, output_directory, output_name, configuration, silent, codesigning_identity, skip_package_ipa, include_symbols, include_bitcode, export_method, export_options, export_xcargs, skip_build_archive, build_path, archive_path, derived_data_path, result_bundle, buildlog_path, sdk, toolchain, destination, export_team_id, xcargs, xcconfig, suppress_xcode_output, disable_xcpretty, xcpretty_test_format, xcpretty_formatter, xcpretty_report_junit, xcpretty_report_html, xcpretty_report_json, analyze_build_time, xcpretty_utf
Environment
Stack

Key
Value

OS
10.12.4

Ruby
2.2.2

Bundler?
false

Git
git version 2.8.2

Installation Source
/usr/local/var/rbenv/versions/2.2.2/bin/fastlane

Host
Mac OS X 10.12.4 (16E195)

Ruby Lib Dir
/usr/local/var/rbenv/versions/2.2.2/lib

OpenSSL Version
OpenSSL 1.0.2d 9 Jul 2015

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode7.app/Contents/Developer/

Xcode Version
7.3.1

System Locale

Variable
Value

LANG
es_ES.UTF-8
✅

LC_ALL
es_ES.UTF-8
✅

LANGUAGE

fastlane gems

Gem
Version
Update-Status

fastlane
2.44.0
🚫 Update available

Loaded fastlane plugins:
No plugins Loaded
Loaded gems

Gem
Version

slack-notifier
1.5.1

CFPropertyList
2.3.5

claide
1.0.2

colored2
3.1.2

nanaimo
0.2.3

xcodeproj
1.5.0

rouge
2.0.7

xcpretty
0.2.8

terminal-notifier
1.8.0

plist
3.3.0

public_suffix
2.0.5

addressable
2.5.1

multipart-post
2.0.0

word_wrap
1.0.0

tty-screen
0.5.0

babosa
1.0.2

colored
1.2

highline
1.7.8

commander-fastlane
4.4.5

excon
0.57.0

faraday
0.12.1

unf_ext
0.0.7.4

unf
0.1.4

domain_name
0.5.20170404

http-cookie
1.0.3

faraday-cookie_jar
0.0.6

fastimage
2.1.0

gh_inspector
1.0.3

declarative
0.0.9

declarative-option
0.1.0

representable
3.0.4

mime-types-data
3.2016.0521

mime-types
3.1

little-plugger
1.1.4

multi_json
1.12.1

logging
2.2.2

jwt
1.5.6

memoist
0.16.0

os
0.9.6

signet
0.7.3

googleauth
0.5.1

httpclient
2.8.3

google-api-client
0.12.0

mini_magick
4.5.1

multi_xml
0.6.0

security
0.1.3

xcpretty-travis-formatter
0.0.4

dotenv
2.2.1

bundler
1.15.1

faraday_middleware
0.11.0.1

json
2.1.0

rubyzip
1.2.1

unicode-display_width
1.3.0

terminal-table
1.8.0

Hey @eventwo-com, we removed this recently since it has been deprecated for over a year now and unsupported. You can learn about the differences in the code signing section of our getting started guide so you can use new way to do it  🎉
We removed this functionality because you can no longer submit to Apple using Xcode 7.

Hi @taquitos, thanks a lot for your response. We will try to downgrade our fastlane version meanwhile we implement changes needed.

@eventwo-com We'd advice against downgrading fastlane, as you'll have to migrate to the latest Xcode sooner or later. Really sorry we removed this option, but it has been deprecated for over a year and it was necessary. Instead try to follow our code signing guide, which should make it easy to upgrade 👍

Hi @KrauseFx, thanks a lot for your response. We are already working on it!
Kind regards

Nice, great to hear 👍

authors: KrauseFx eventwo-com taquitos


text:
Cleanup rake_task tests; Extend examples

Add to the examples for the rake_task how to pass in the Rails environment.
This seems obvious after the fact but was not clear to me up front. Hopfully
this helps people in the future figure this out a little easier.
Changes

RakeTasks tests move to specs
example/Rakefile update for Rails => :environment

Recommended reviewers: @adarsh

LGTM

authors: adarsh alieander


text:
add options to use custom struct tag name instead of structs:"..."

I would like to use json:"..." instead of structs:"..", for now I am forced to use both when a struct is used by encoding/json and fatih/structs with converting structs to map[string]interface{}.
type ErrorResponse struct {
	Error string `json:"error" structs:"error"`
}

Specifically, I need this in the structs.Map() function, but I guess it would be good if this would be added as to other places in the code as well.

Actually you can do it already http://godoc.org/github.com/fatih/structs#Struct :) By default it's "structs" but you can change it to "json".

Change the TagnName field.

Or change the global variable name "DefaultTagName"

@fatih hey cool! thanks. you're quick :)

You're welcome :)

authors: fatih oryband

repo: fatih/structs


text:
Tracking oldchains newchain filenames

Add new options to MolID.py to be able to track chain names (origina, new names, entities, file names)

Changes were added to a branch that was behind the master branch.


text:
BUG: Layer.get_input returns the wrong input for shared nodes

Hi all
I'm trying to build a network that takes in two sentences, turns them into fixed-length representations using a shared feed-forward NN, and then calculates their dot product. Unfortunately, I get an error when I try this.
My code for this is
from keras.models import Graph, Sequential
from keras.layers.embeddings import Embedding
from keras.layers.core import Dense, Flatten

inner_model = Sequential()

# This is the global word lookup table
embedding = Embedding(input_dim=400, output_dim=300, input_length=4)

inner_model.add(embedding)
inner_model.add(Flatten())
inner_model.add(Dense(output_dim=600))
inner_model.add(Dense(output_dim=300))

model = Graph()
model.add_input(name='left', input_shape=(4,), dtype='int')
model.add_input(name='right', input_shape=(4,), dtype='int')
model.add_shared_node(layer=inner_model,
                      name='arg_comp',
                      inputs=['left', 'right'],
                      merge_mode='dot', dot_axes=((0,), (0,)),
                      create_output=True)

model.compile(loss={'arg_comp': 'binary_crossentropy'}, optimizer='sgd')

However, I get the following exception:
Traceback (most recent call last):
  File "src/models/test_arg_comp.py", line 25, in <module>
    model.compile(loss={'arg_comp': 'binary_crossentropy'}, optimizer='sgd')
  File "build/bdist.linux-x86_64/egg/keras/models.py", line 635, in compile
  File "build/bdist.linux-x86_64/egg/keras/backend/theano_backend.py", line 361, in function
  File "build/bdist.linux-x86_64/egg/keras/backend/theano_backend.py", line 354, in __init__
  File "/usr/local/lib/python2.7/dist-packages/theano/compile/function.py", line 266, in function
    profile=profile)
  File "/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 511, in pfunc
    on_unused_input=on_unused_input)
  File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 1465, in orig_function
    on_unused_input=on_unused_input).create(
  File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 1124, in __init__
    self._check_unused_inputs(inputs, outputs, on_unused_input)
  File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 1244, in _check_unused_inputs
    raise UnusedInputError(msg % (inputs.index(i), i.variable, err_msg))
theano.compile.function_module.UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 1 is not part of the computational graph needed to compute the outputs: right.
To make this error into a warning, you can pass the parameter on_unused_input='warn' to theano.function. To disable it completely, use on_unused_input='ignore'.

Is this a bug in the Siamese layer? Or am I doing something wrong?
Thanks
Kris

Update: I think I've found the minimal counterexample. The following code compiles and works fine:
model = Graph()
model.add_input(name='l', input_shape=(10,))
model.add_input(name='r', input_shape=(10,))
model.add_shared_node(name='comp', layer=Dense(output_dim=1), inputs=['l', 'r'], merge_mode='dot', dot_axes=[[1], [1]], create_output=True)
model.compile(loss={'comp': 'mse'}, optimizer='sgd')

but the following throws an error:
inner_model = Sequential()
inner_model.add(Dense(output_dim=1))
model = Graph()
model.add_input(name='l', input_shape=(10,))
model.add_input(name='r', input_shape=(10,))
model.add_shared_node(name='comp', layer=Dense(output_dim=1), inputs=['l', 'r'], merge_mode='dot', dot_axes=[[1], [1]], create_output=True)
model.compile(loss={'comp': 'mse'}, optimizer='sgd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/keras/models.py", line 605, in compile
  File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 1596, in get_output
  File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 1566, in get_output_dot
  File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 1522, in get_output_at
  File "build/bdist.linux-x86_64/egg/keras/layers/containers.py", line 103, in get_output
  File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 873, in get_output
AttributeError: 'Dense' object has no attribute 'W'

Strangely enough, if I add an input_dim argument to the Dense layer in inner_model, everything compiles and works fine. I have a suspicion set_previous isn't being called correctly by add_shared_node.
Does anyone know more?

Strangely enough, the following code works:
inner_model = Sequential()
inner_model.add(Dense(input_dim=1, output_dim=2))
model = Graph()
model.add_input(name='l', input_shape=(1,))
model.add_input(name='r', input_shape=(1,))
model.add_shared_node(name='comp', layer=inner_model, inputs=['l', 'r'], merge_mode='dot', dot_axes=[[1], [1]], create_output=True)
model.compile(loss={'comp': 'mse'}, optimizer='sgd')

but the following doesn't:
inner_model = Sequential()
inner_model.add(Dense(input_dim=1, output_dim=2))
inner_model.add(Flatten())
model = Graph()
model.add_input(name='l', input_shape=(1,))
model.add_input(name='r', input_shape=(1,))
model.add_shared_node(name='comp', layer=inner_model, inputs=['l', 'r'], merge_mode='dot', dot_axes=[[1], [1]], create_output=True)
model.compile(loss={'comp': 'mse'}, optimizer='sgd')

Is there anything the Flatten layer could be doing that screws everything up?

I think I've found the cause of the bug.
In the get_input() method of the base Layer class, we cache the input of the previous layer, and return that if we have seen it before. However, if the previous layer can change its output computation graph, then this is not picked up, and we return the stale input.
I think the best way to fix this is to change how previous layers are hashed to avoid hash collisions like this again. So, instead of
previous_layer_id = '%s_%s' % (id(self.previous), train)

replace this with
first_layer = self
while hasattr(first_layer.previous):
    first_layer = first_layer.previous
previous_layer_id = '%s_%s' % (id(first_layer), train)

@farizrahman4u does this sound OK to you?

@around1991 The Siamese layer was introduced before some serious API changes and the caching stuff. Now that we have __call__ for layer, I will be updating the Siamese layer to use it, and this issue  will disappear with it.

@farizrahman4u thanks for the update, but I don't think that fixes the underlying cause of the bug. Layer.get_input will still be bugged, and any use of it could potentially introduce unwanted behaviour. I still think it should be fixed. I've got some diffs which fix it, but they cause a bunch of unit tests to fail, so I'm currently looking to patch them and then submit a pull request.

@around1991 When you use __call__, the get_input of the layer is temporarily replaced with  a lambda  function, so no caching.

@farizrahman4u however, on a multi-layer container (which is where the bug originated in the first place), the __call__ method only replaces get_input on the first layer of the container. When get_output of the last layer of the container is called within the __call__ method, it will still call get_input on all layers but the first, and the layer caching bug will still cause issues.
I think layer output caching will still need to be fixed, even when the Siamese layer changes to use __call__. I apologise for tagging you, as I thought the issue was with Siamese to begin with. Do you know who wrote the layer caching code?

You are right. i think its @fchollet.

#1271 Fixes all issues related to Siamese layer. Including layer caching

Hmm, I'm not convinced that just turning off layer caching is the right way to go. Presumably @fchollet added it for a reason? I do think the fix is (relatively) straightforward: cache inputs based on the original source of the input data, not the proximate source. That way, different input values are still cached, and we can retrieve them easily enough.

@around1991 The layer cache is turned of only temporarily during __call__ is run. Everything is reset back later. The reason layer caching is done is to make sure that the tensors are not built multiple times in complex graphs, where a layer might be used more the ones. Caching is almost irrelevant in the context of __call__ (it has got nothing to with graphs).

repo: fchollet/keras


text:
Saving and restoring memory state

Is it possible to save memory state in LSTM and restore its value to the model when it is needed?

Yes. The states attribute in a recurrent layer is a list of states, you can call K.set_value(state[i]) or K.get_value(state[i]) on them.

wow this took me only a week to find out lol. but that's great.

authors: fchollet mininaNik zuoanqh


text:
fit_generator returning None. How to do this properly?

This is my code:
def extract_hypercolumn(model, layer_indexes, instance):
    layers = [model.layers[li].output for li in layer_indexes]
    get_feature = K.function([model.layers[0].input],layers)
    assert instance.shape == (1,3,224,224)
    feature_maps = get_feature([instance])
    hypercolumns = []
    for convmap in feature_maps:
        for fmap in convmap[0]:
            upscaled = scipy.misc.imresize(fmap, size=(224, 224),
                                        mode="F", interp='bilinear')
            hypercolumns.append(upscaled)

    return np.asarray(hypercolumns)

def generate_batch_from_hdf5():
    f = h5py.File("raw_image_tensors.h5","r")
    dset_X = f.get('X')
    dset_y = f.get('y')

    print dset_X.shape,dset_y.shape
    for i in range(dset_X.shape[0]):
        X = dset_X[i:i+1,:,:,:]
        X = np.tile(X,(1,3,1,1))
        hc = extract_hypercolumn(model,[3,8,15,22],X)
        yield dset_X[i:i+1,:,:,:],dset_y[i:i+1,:,:]

def VGG_16(weights_path='vgg16_weights.h5'):
    model = Sequential()
    model.add(ZeroPadding2D((1,1),input_shape=(3,224,224)))
    model.add(Convolution2D(64, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(64, 3, 3, activation='relu'))
    model.add(MaxPooling2D((2,2), strides=(2,2)))

    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(128, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(128, 3, 3, activation='relu'))
    model.add(MaxPooling2D((2,2), strides=(2,2)))

    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(256, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(256, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(256, 3, 3, activation='relu'))
    model.add(MaxPooling2D((2,2), strides=(2,2)))

    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(MaxPooling2D((2,2), strides=(2,2)))

    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(ZeroPadding2D((1,1)))
    model.add(Convolution2D(512, 3, 3, activation='relu'))
    model.add(MaxPooling2D((2,2), strides=(2,2)))

    model.add(Flatten())
    model.add(Dense(4096, activation='relu'))
    model.add(Dropout(0.5))
    model.add(Dense(4096, activation='relu'))
    model.add(Dropout(0.5))
    model.add(Dense(1000, activation='softmax'))

    if weights_path:
        model.load_weights(weights_path)

    return model

model = VGG_16()
sgd = SGD(lr=0.1,decay=1e-6,momentum=0.9,nesterov=True)
model.compile(optimizer=sgd,loss='categorical_crossentropy')

def Colorize(weights_path=None):
    model = Sequential()
    # input: 100x100 images with 3 channels -> (3, 100, 100) tensors.
    # this applies 32 convolution filters of size 3x3 each.

    model.add(Convolution2D(512, 1, 1, border_mode='valid',input_shape=(960,224,224)))
    model.add(Activation('relu'))
    model.add(normalization.BatchNormalization())

    model.add(Convolution2D(256, 1, 1, border_mode='valid'))
    model.add(Activation('relu'))
    model.add(normalization.BatchNormalization())

    model.add(Convolution2D(112, 1, 1, border_mode='valid'))
    model.add(Activation('relu'))
    model.add(normalization.BatchNormalization())

    print "output shape: ",model.output_shape
    #softmax
    model.add(Reshape((112,224*224)))

    print "output_shape after reshaped: ",model.output_shape
    model.add(Activation('softmax'))

    if weights_path:
        model.load_weights(weights_path)

    return model

color = Colorize()
color.compile(optimizer=sgd,loss='categorical_crossentropy',metrics=["accuracy"])
color.fit_generator(generate_batch_from_hdf5(),samples_per_epoch=5,nb_epoch=5)

So this actually works ---UNTIL you add in that line hc = extract_hypercolumn(model,[3,8,15,22],X). Because hc isn't being yielded, I don't understand why it would have anything to do with whether the loop works or not. The eventual goal is to yield hc, but this is a baby step in that direction. Unfortunately, when you run the code as is you get this traceback:
Using TensorFlow backend.
output shape:  (None, 112, 224, 224)
output_shape after reshaped:  (None, 112, 50176)
Epoch 1/5
(100, 1, 224, 224) (100, 112, 50176)
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/alex/anaconda2/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/alex/anaconda2/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/alex/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 404, in data_generator_task
    generator_output = next(generator)
StopIteration

Traceback (most recent call last):
  File "load.py", line 143, in <module>
    color.fit_generator(generate_batch_from_hdf5(),samples_per_epoch=5,nb_epoch=5)
  File "/Users/alex/anaconda2/lib/python2.7/site-packages/keras/models.py", line 651, in fit_generator
    max_q_size=max_q_size)
  File "/Users/alex/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 1358, in fit_generator
    'or (x, y). Found: ' + str(generator_output))
Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

If you want to run this for yourself, you will have to download vgg16_weights.h5 for yourself - easily google-able but a large - 500MB file. Otherwise you can take my word for it that the extract_hypercolumn functions works as intended. Though you will still need raw_image_tensors.h5 (attached and quite small). In fact its funny because if you run this directly:
f = h5py.File("raw_image_tensors.h5","r")
dset_X = f.get('X')
dset_y = f.get('y')
for i in range(dset_X.shape[0]):
    X = dset_X[i:i+1,:,:,:]
    X = np.tile(X,(1,3,1,1))
    hc = extract_hypercolumn(model,[3,8,15,22],X)
    print hc,dset_y[i:i+1,:,:]

it prints out just fine - try it! Its like the combination of yielding something into fit_generator with that extract_hypercolumn thing is just too much for it to handle and it yields None. I hope this is replaceable enough, and if theres anything thats unclear, please don't hesitate to ask.

/home/sai/anaconda2/bin/python /home/sai/code/frame_play/face_alone_BigBang.py Using TensorFlow backend. I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:  name: GeForce GTX 960 major: 5 minor: 2 memoryClockRate (GHz) 1.291 pciBusID 0000:01:00.0 Total memory: 4.00GiB Free memory: 3.12GiB I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0  I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y  I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 960, pci bus id: 0000:01:00.0) Epoch 1/50 shuffle Process Process-1: Traceback (most recent call last):   File "/home/sai/anaconda2/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap     self.run()   File "/home/sai/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run     self._target(*self._args, **self._kwargs)   File "/home/sai/anaconda2/lib/python2.7/site-packages/Keras-1.0.5-py2.7.egg/keras/engine/training.py", line 427, in data_generator_task     generator_output = next(generator)   File "/home/sai/code/frame_play/data_flow.py", line 21, in next     return self.it.next()   File "/home/sai/code/frame_play/data_flow.py", line 68, in image_generator     img = img.resize((50, 50))   File "/home/sai/anaconda2/lib/python2.7/site-packages/PIL/Image.py", line 1526, in resize     self.load()   File "/home/sai/anaconda2/lib/python2.7/site-packages/PIL/ImageFile.py", line 235, in load     raise_ioerror(e)   File "/home/sai/anaconda2/lib/python2.7/site-packages/PIL/ImageFile.py", line 59, in raise_ioerror     raise IOError(message + " when reading image file") IOError: broken data stream when reading image file Traceback (most recent call last):   File "/home/sai/code/frame_play/face_alone_BigBang.py", line 17, in <module>     validation_data=test_generator, nb_val_samples=38584, pickle_safe=True)   File "/home/sai/anaconda2/lib/python2.7/site-packages/Keras-1.0.5-py2.7.egg/keras/models.py", line 683, in fit_generator     pickle_safe=pickle_safe)   File "/home/sai/anaconda2/lib/python2.7/site-packages/Keras-1.0.5-py2.7.egg/keras/engine/training.py", line 1419, in fit_generator     'or (x, y). Found: ' + str(generator_output)) Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None
the same to you, I just see someone talk about this, there is a problem about thread-safe.
`# -- coding: utf-8 --
author = sai
import numpy as np
import h5py
import random
from PIL import Image
import threading
class threadsafe_iter:
"""Takes an iterator/generator and makes it thread-safe by
serializing call to the next method of given iterator/generator.
"""
def init(self, it):
self.it = it
self.lock = threading.Lock()
def __iter__(self):
    return self

def next(self):
    with self.lock:
        return self.it.next()

def threadsafe_generator(f):
"""A decorator that takes a generator function and makes it thread-safe.
"""
def g(*a, **kw):
return threadsafe_iter(f(*a, **kw))
return g
def load_audio(labels, count, audio, tags):
'''
根据标签生成与人脸数据对应的语音数据
'''
# 得到标签相等得行
idx = [np.where(np.argmax(tags, axis=1) == labels)[0]]
# print idx
np.random.seed(count)
audio_data = np.zeros((375,))
# rn = np.random.sample(idx[0], 5)
rn = [np.random.choice(idx[0]) for i in xrange(5)]  # 从item中随机选取5个数，即选取5行
# print audio[rn].shape
audio_data = audio[rn].reshape(375)
return audio_data
@threadsafe_generator
def image_generator(batch_size, train=True):
images = np.zeros((batch_size, 50, 50, 3), dtype=np.float32)
labels = []
count = 0
if train:
path = './BingBang/BBT-train-file-list.txt'
else:
path = './BingBang/BBT-test-file-list.txt'
with open(path, 'r') as f:
readlines = f.readlines()
print 'shuffle'
random.shuffle(readlines)
while 1:
for i, item in enumerate(readlines):
line = item.split(' ')
fileuint = line[0].split('\')
label = int(line[1])
#        print fileuint
# windows 文件路径格式转换为 Linux 文件格式
filename = './BingBang/' + fileuint[0] + '/' + fileuint[1] + '/' + fileuint[2] + '/' + fileuint[3]
# img = cv2.imread(filename)
# img = cv2.resize(img, dsize=(50, 50))
img = Image.open(filename)
img = img.resize((50, 50))
images[count] = img
labels.append(label)
count += 1
            if count==batch_size:
                images = images.transpose(0, 3, 1, 2)/255.
                yield (images, labels)
                count = 0
                labels = []
                images = np.zeros((batch_size, 50, 50, 3), dtype=np.float32)

def av_generator(batch_size, train=True):
images = np.zeros((batch_size, 50, 50, 3), dtype=np.float32)
audio_data = np.zeros((batch_size, 375))
labels = []
count = 0
if train:
path = './BingBang/BBT-train-file-list.txt'
else:
path = './BingBang/BBT-test-file-list.txt'
with open(path, 'r') as f:
audio_path = './data/BigBang/audio_merge/audio_samples.mat'
with h5py.File(audio_path, 'r') as ff:
audio = ff[ff.keys()[0]][:]
tags = ff[ff.keys()[1]][:]
readlines = f.readlines()
print 'shuffle'
random.shuffle(readlines)
while 1:
for i, item in enumerate(readlines):
line = item.split(' ')
fileuint = line[0].split('\')
label = int(line[1])
audio_data[count] = load_audio(label, count, audio, tags)
#        print fileuint
# windows 文件路径格式转换为 Linux 文件格式
filename = './BingBang/' + fileuint[0] + '/' + fileuint[1] + '/' + fileuint[2] + '/' + fileuint[3]
# img = cv2.imread(filename)
# img = cv2.resize(img, dsize=(50, 50))
img = Image.open(filename)
img = img.resize((50, 50))
images[count] = img
labels.append(label)
count += 1
if count==batch_size:
images = images.transpose(0, 3, 1, 2)/255.
yield ([images, audio_data], labels)
count = 0
labels = []
images = np.zeros((batch_size, 50, 50, 3), dtype=np.float32)
audio_data = np.zeros((batch_size, 375))`
this is my generator, however it doesn't work

I also got
Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None
The problem is in line 498 of image.py where the labels are filtered by an array of indices.
If the labels are actually an HDF5 object, only sorted lists are supported for slicing. A few lines above the input is not sliced but accessed in a loop (that's why it works for X).
A workaround is to convert all labels to a numpy array when you load your dataset.
The fix will be to make a sorted list out of index_array
cheers

authors: AlexMarshall12 michaelosthege saicoco


text:
lstm for phoneme classification

Hi all !
I'm new here, I'm trying to train a RNN using LSTM for phoneme classification. The input to the RNN is the 39 MFCCs coefficients of the current time frame, and the output is one of 39 phoneme classes (one hot).
I understand that  the expected input data shape is in the form: (batch_size, timesteps, data_dim).
I don't understand whatdoes  timesteps stand for?
I used this code:
data_dim = 39
nb_classes = 39

model = Sequential()
model.add(LSTM(32, return_sequences=True,
               input_shape=(None, data_dim)))
model.add(LSTM(32, return_sequences=True))
model.add(LSTM(32))
model.add(Dense(39, activation='softmax'))

model.compile(loss='categorical_crossentropy',
              optimizer='rmsprop')

model.fit(X_train, Y_train,
          batch_size=64, nb_epoch=5,
          validation_split=0.1)

and I keep geting this error:
TypeError: ('Bad input argument to theano function with name "C:\winpython\WinPython-64bit-3.4.4.2Qt5\python-3.4.4.amd64\lib\site-packages\keras\backend\theano_backend.py:442"  at index 0(0-based)', 'Wrong number of dimensions: expected 3, got 2 with shape (64, 39).')
I'l be happy for some help..
Thanks

Hello,
I think you need :
model.add(Dense(1))
model.add(Activation('sigmoid'))
at the end of your network

But its a multi class problem, I have 39 classes (indexes of the phonemes). Eventually I want to determine which phoneme was active now.

Yes, sorry about that.
Lstm expects something like (input_dim=xx, input_length=yy )
Input dim is the dimension of each element of your sequence and input_length is the length of your sequence.
You might need to reshape your input data so that each learning example is two-dimensional ( each row is a element of the sequence)
Hope that helps

Thanks for the quick answer!
I just want to be sure -
My input features are the MFCC vector for each time frame (length of 39), and lets say I have 10000 samples, so my X_train size is [10000,39] . I need to reshape X_train to have time-steps? To do so, i just need to take a window (with length of the time-steps) of my data. For example if i Chose time-steps=3, then X_train will be at size [9998,2,39]?

authors: Shlomke myouness


text:
Fixed a bug that cause intermittent test failures.

Related to: https://jira.duraspace.org/browse/FCREPO-2270

@acoburn Please feel free to merge.


text:
arch-go breaks if it doesn't inform the maxParameters property

In a project using arch-go, we don't want to limit the number of parameters in a function, so we try to remove them. This causes arch-go to break
how to test:
In the project root, run the arch-go command without adding maxParameters to the file

Thanks for your report. There was an issue in functions rules.
Version v1.4.4 fixes this issue.
go install github.com/fdaines/arch-go@v1.4.4

authors: edmarSoaress fdaines

repo: fdaines/arch-go


text:
Add typealias command

This PR is easier to review commit-by-commit
This adds a new typealias command that:

Finds all the typealias declarations in a file or folder and outputs all the names
Has an optional --name  parameter to filter for a single typealias and also outputs information related to the identifiers of the typealias

Codecov Report

Merging #10 into master will increase coverage by 0.07%.
The diff coverage is 98.69%.

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
+ Coverage   98.21%   98.29%   +0.07%
==========================================
  Files          20       24       +4
  Lines         783      936     +153
==========================================
+ Hits          769      920     +151
- Misses         14       16       +2

Impacted Files
Coverage Δ

...rces/SwiftInspectorCommands/InspectorCommand.swift
100.00% <ø> (ø)

...rces/SwiftInspectorCommands/TypealiasCommand.swift
96.77% <96.77%> (ø)

...iftInspectorCore/Tests/TypealiasAnalyzerSpec.swift
97.95% <97.95%> (ø)

...InspectorCommands/Tests/TypealiasCommandSpec.swift
100.00% <100.00%> (ø)

Sources/SwiftInspectorCore/TypealiasAnalyzer.swift
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

authors: codecov-io fdiaz

repo: fdiaz/SwiftInspector


text:
logout

When user logout, I can only get "accessToken:" at server side:
app.on('logout', data => {
    console.log('logout', data);
});

How can I retrieve user's account, such as email?

Hi.
I use this part of code at client side and it should be what you want:
import decode from 'jwt-decode';

const data = decode(token)
data.userId

Like that (not tested):
import decode from 'jwt-decode';
app.on('logout', ({accessToken}) => {
  const {userId} = decode(accessToken)
  const user = app.service("users").get(userId)
});

The above worked for me. Thanks @Buom01 :-D

repo: feathersjs/authentication


text:
Action Type Namespace

Currently all of the action types are named SERVICE_NAME + ACTION, it would be great if you can specify a namespace to adhere to Ducks.
Or even better would it be possible to pass a function to create the action type, like a formatter.
Example:
(name, action) => `app-namespace/${name}/${action}`;

Why would one instance of Redux be used for multiple user apps?

You could specify whatever you wanted for the action type, so when creating the action types you'd call actionTypeFormatter(name, action) and get the action type that will be used.
Then the user could specify the function in the options on init if they wanted to use custom action types.
const services = reduxifyServices(feathersClient, ['users', 'messages'], {
  actionTypeFormatter: (name, action) => `namespace/${name}/${action}`,
});

https://github.com/erikras/ducks-modular-redux
I have a middleware which logs all of the actions in GA so I can tell the frequency of each action. It's just a basic string match on the namespace so I don't log anything that isn't needed.
This might be a special use-case as I'm not sure if many people do this.

I will leave namespacing aside until there is more of an interest in it.
Fell free to reopen this issue.

I actually agree with @Sicria.
What if, unlikely as it may seem, that my own app has an action named SERVICES_MESSAGES_FIND, whose reducer is doing something radically different than what feathers-redux does. There might be confusion when feathers-redux dispatches its action.
I wouldn't go as far as adding a formatter (too overkill), but renaming all actions to something like feathersjs/services/MESSAGES_FIND, feathersjs/services/MESSAGES_FIND_PENDING etc would be an idea to prevent confusion. Plus it's following the Ducks naming convention.
Really, it's just changing this line.

It looks like this repo is reaching some level of maturity and the needs are changing.
Perhaps either of you can submit a PR as I'm tied up. The optional namespace can be passed in the option.

authors: Sicria amaurymartiny eddyystop

repo: feathersjs/feathers-redux


text:
🛑 맛소스통 is down

In 7f75c28, 맛소스통 (https://masost.one/api/meta) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 맛소스통 is back up in 546e4b2 after 7 minutes.

repo: fediverses-kr/upptime-api


text:
🛑 넷스피어 원 is down

In 106ee39, 넷스피어 원 (https://netsphere.one/api/v1/instance/activity) was down:

HTTP code: 403
Response time: 779 ms

Resolved: 넷스피어 원 is back up in 9f1f7a5 after 17 minutes.


text:
Multiline info not respecting newlines in minutes

I ran the infra meeting on Matrix last week and noticed that the newlines in multiline info are not respected.
See first line in minutes from the meeting.

Opened https://github.com/GregSutcliffe/maubot-meetings/issues/43

authors: Zlopez ryanlerch

repo: fedora-infra/maubot-fedora


text:
update to ghost 0.11.9

update to ghost 0.11.9

:clap:

repo: felixrieseberg/Ghost-Azure


text:
Blank space randomly at top of cropper

On some images, the image goes to the top of the cropper. On some, it goes to the middle, and on others, there is just an unnecessary amount of blank space at the top of the cropper above the image.
I can provide screenshots if you need them, but I assumed other people had this problem and had developed workarounds.

Why not read the documentation first?
Just set the viewMode option to 1!

authors: fengyuanchen mardanlin

repo: fengyuanchen/cropper


text:
Update chart victoria-logs-single to 0.8.2

This PR contains the following updates:

Package
Update
Change

victoria-logs-single
patch
0.8.1 -> 0.8.2

Release Notes

VictoriaMetrics/helm-charts (victoria-logs-single)
v0.8.2
Compare Source
Release notes for version 0.8.2
Release date: 2024-11-22

Removed redundant VECTOR_SELF_NODE_NAME env variable from vector values. See this issue.
Added Vector dashboard. See this issue.
updated common dependency 0.0.23 -> 0.0.31
fixed app.kubernetes.io/version tag override if custom tag is set. See this issue.
Upgraded VictoriaLogs 0.41.0 -> 1.0.0

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠ Warning: custom changes will be lost.

repo: fenio/homelab


text:
Updated actions to node20

Pre-flight Checklist
Please ensure you've completed all of the following.

[X] I have read the Contributing Guidelines for this project.
[X] I agree to follow the Code of Conduct that this project adheres to.
[X] I updated the version package Updating

Description of Change

Updated gh action to node20 to suppress warnings

@all-contributors please add @Choromanski for code

authors: Choromanski vraravam

repo: ferdium/ferdium-recipes


text:
[FEAT] Where is itemTappable option mentioned in the Medium article?

Is your feature request related to a problem? Please describe.
Hi! In the Medium article I saw a mention of a feature: itemTappable - makes the pages clickable. But I can't find it in the library itself. Can someone please clarify?
Also, I'd like to know whether this feature enables the user to tap on non-focused page in order to switch to that page, because I could really make use of that functionality.
Thanks.

Hi @dinotrnka , I published that article long ago, with the first version of the framework. I decided to remove it as it’s something that can very easily be achieved by using onTapGesture and setting the page index and it’s very specific to certain users. As the library aims to be of general purpose, this went away. It was creating trouble to some users too as gesture management is not quite well defined yet in SwiftUI.
I don’t think it’s worth bringing it back but I’m happy to share code to do so if needed

Hi @fermoya, thanks for your response. If you could share the code for that specific case then I'd be very grateful. Thanks!

So you need to do:
Pager(page: $pageIndex,
           data: myData) { index in
    MyPage(index: index)
        .onTapGesture {
                withAnimation {
                     pageIndex = index
                 }
         }
}

Thanks, works like a charm!

authors: dinotrnka fermoya

repo: fermoya/SwiftUIPager


text:
Supports for db clients, such as pg client, mysql client, sqlite client, redis client

Hi, is there any plan for supports for db clients' handle, such as pg client, mysql client, sqlite client, redis client?
Thank you.

Hi, @miketang84!
We are in the process of building a Redis client right now, @fibonacci1729 should have a draft PR up soon!
For relational databases we definitely want to have support, we just want to see how that would look like first.
Do you have thoughts on how such a client would look like?

@miketang84 Here is the draft PR for the initial Redis client support. Would love your feedback on anything that can be added or improved here for your use-cases!
https://github.com/fermyon/spin/issues/181

SQL databases are tricky to support generically since they each have different APIs/wire protocols. One option might be to build an interface that can wrap ODBC (perhaps modeled after some existing crate like this one). That would still require Spin to run the ODBC drivers, which might be another good use-case for a plugin system like we've started to discuss in #302.
Longer-term I think the WASI sockets proposal would enable database-specific drivers for better performance / features.

Thank you, I will be deep in it.

@fibonacci1729 Thank you, I am going to dive in it.

@lann In my opinion, I think currently we have better not design an abstract layer for general SQL db, but focus on each concrete sql db client, maybe first is postgresql. If redis client could work in Spin, I presume pg driver could work too.

Hello! Please forgive the essay, I have given this problem a great
deal of thought recently because it interests me.
Note: I am a rust developer more than a wasm developer. I do not have
a wasm-related job and it's hard to keep up with the state of
wasm dev as an interested outsider; please correct any errors!
Much of the API you'd expect from a database adapter is quite
amenable. Many things work with integers. There are a couple of things
that are slightly more troublesome:

Strings (interface type?)
Arrays/Lists (??)
Connections (reference type?)

Should be closed automatically when no longer used.

Prepared queries:

Should return a handle (reference type?)
Should not be usable after closing a connection (??)
Bind arbitrary parameter values when executed (strings?)

Result rows could be anything

Basically a dependent type and any attempt to pretend otherwise is
going to be incredibly language-specific:

In rust we might use an iterator over an enum so you can avoid extra allocations etc.
In unityped languages you probably just want to inflate everything into e.g. an array of tuples.

Probably best to use a buffer and let the user's library parse the results.
In which case what are we adding over just giving them a socket
and a connection pool with a little database-specific knowledge?

It's also worth considering that there is a lot of waiting for the
server to get back to you, for which we'd probably want async support
(and honestly i'm not sure what's going on with the async wasm stream
at the minute).
Other than this, I'd endorse the approach in the previous comment of
doing things on a per-database basis. For example, PostgreSQL supports
query pipelining (useful for minimising latency), but not everything does.
I hope some of this was useful!

Thanks for the write-up, @jjl ! A few notes:

Note: I am a rust developer more than a wasm developer. I do not have a wasm-related job and it's hard to keep up with the state of wasm dev as an interested outsider; please correct any errors!

The component model design we're working with here is under heavy development; it can be hard for any of us to keep up with everything!

Strings (interface type?)
Arrays/Lists (??)

Yep, interface types, and in particular a list of variant or union types for bound parameters.

Connections (reference type?)

Should be closed automatically when no longer used.

Prepared queries:

Should return a handle (reference type?)

If you haven't already, take a look at the resource types proposal, which includes support for reference-counting-based cleanup.

Result rows could be anything

Probably best to use a buffer and let the user's library parse the results.
In which case what are we adding over just giving them a socket
and a connection pool with a little database-specific knowledge?

Other than this, I'd endorse the approach in the previous comment of doing things on a per-database basis. For example, PostgreSQL supports query pipelining (useful for minimising latency), but not everything does.

I agree that supporting every feature of every database in a single generic interface is effectively impossible, and that database-specific libraries will be necessary. That said, many applications only need a small common set of features and data types, and I think having a common interface with limited functionality would meet a lot of peoples' needs.

Thanks for the response.

Yep, interface types, and in particular a list of variant or union types for bound parameters.

Bound parameters could be of any type supported by postgres or added by a user. I fear this approach might be a bit limiting.
IME most projects have that one weird type they need (different per-project of course!)

If you haven't already, take a look at the resource types proposal, which includes support for reference-counting-based cleanup.

I found this before, but I misunderstood it. With all the talk of copying handles, I hadn't realised they were refcounted!

I agree that supporting every feature of every database in a single generic interface is effectively impossible, and that database-specific libraries will be necessary. That said, many applications only need a small common set of features and data types, and I think having a common interface with limited functionality would meet a lot of peoples' needs.

Okay, that's fair enough. I am probably not in that category :laughing:, so i'll go wander back to my own thing now. Luck!

PostgREST
In the meantime while WASI Sockets are on the way and proper host component support gets implemented, I made this demo of PostgREST running in Spin so users can insert, select and do most SQL commands you could before.
This isn't super related to this issue, but it is an alternative for those who like to hack things together :)
https://github.com/ecumene/spin_pg

Aha!  Also I add the raw support for postgres db, alike the way of outbound redis.
https://github.com/miketang84/spin/tree/outbound-pg/crates/outbound-pg
I must do some clean before I make pull request.

An initial implementation of Postgres has now landed, and there's also an implementation of MySQL in PR.  My suggestion is we close this issue, and open more specific issues for individual databases or for discussion of alternative designs.

Opening individual issues to track implementations makes sense to me.
Thank you all for the great suggestions!

authors: ecumene fibonacci1729 itowlson jjl lann miketang84 radu-matei

repo: fermyon/spin


text:
[Backport v1.4] feat(templates): update sdk to v1.4.0

Backporting #1644 to v1.4

This is the first part of catching up the 1.4 release branch commit history with the auto template rev PRs


text:
CLI didn't throw an error when running a deprecated command

It feels like the CLI should throw an error here: https://github.com/fern-vessel/vessel-api/actions/runs/4051765072/jobs/6970429113
I didn’t have a FERN_TOKEN. I also was using fern release which is deprecated for use of fern generate instead.

Deprioritizing

authors: dannysheridan dsinghvi

repo: fern-api/fern


text:
Markdown giving incorrect section numbers

Anybody know why Markdown is choosing to take "9. Parsers" and "10. Generators" and render them as "1. Parsers" and "1. Generators" respectively? More pertinently, how to prevent this?

Attempted in #2

This'll do for now. Thanks for the quick turnaround!

authors: ferno tobypinder

repo: ferno/fastjson


text:
startsWith(" ") returns false in react-native while it should return true.

I'm using react-native, and there is a weird phenomenon when using this library in it. Please see the steps below to reproduce it.
Steps to reproduce
First create a react-native project and install buffer as a dependency.
create-react-native-app react-app-project
cd react-app-project
yarn add buffer

Then add the following lines in App.js:
import { Buffer } from "buffer";

export default class App extends React.Component {
  async componentDidMount() {
    const buffer = Buffer.from("2054", "hex");
    const s = buffer.toString("utf8");
    console.log(s); // s = " T"
    console.log(s.startsWith(" ")); // it will print false!
  }
  ......
}

Run the following command to open the dev menu on your device.
sudo adb shell input keyevent KEYCODE_MENU

Make sure you are not debugging it remotely(Because it works correctly when remote debugging is enabled). Anyway, make it look like the following image.

Then run the application.
yarn start

Open Expo on your device, and start the app in it. Then you will see that false is printed on your computer screen.
16:15:59:  T
16:15:59: false

But it should be true! Because the first character IS space!
By the way, the issue only occurs in react-native.

Running your code directly in the Node.js terminal works fine for me:
var B = require('buffer/').Buffer
const buffer = B.from("2054", "hex")
const s = buffer.toString("utf8");
console.log(s); // s = " T"
console.log(s.startsWith(" ")); // Prints true!

One thing that I noticed you did wrong is you used require('buffer') instead of require('buffer/'). The latter is required to tell Node to use the npm package and not the built-in buffer package.
In the react-native context, I'm not sure what require('buffer') does, but my guess is that it will pull in an older version of the buffer package which perhaps has a bug.
I'm closing this issue since there's no bug to fix here, but feel free to continue discussion! ✨

authors: feross searene

repo: feross/buffer


text:
Update teslamate_mqtt2abrp.py

I add line for the recognition of the Tesla Model Y RWD 2022. Information tested with the data returned by Teslamate for my own vehicle.

Hey @SirSheik,
I was weighting the pros and cons of hardcoding these trims and the imact it could have on the UX; but in the end there is no source of all the "trim_badges" and their "real world" counterparts, and the user can always set their exact trim as stated in the documentation. So, let's merge this and increase our small vehicle database :).
Thanks for the PR !

authors: SirSheik fetzu

repo: fetzu/teslamate-abrp


text:
添加下拉插件，popup中input type=text 不能输入

添加下拉插件，popup中input type=text 不能输入，无法获得焦点

最近在做一个蒙古文的系统，请问ueditor可以设置成蒙古文的输入方式吗

IE11下伸缩插入的图片，标签宽高属性不会跟着变化

UEditor 在插入超链接的时候，鼠标移动到超链接上 点击时存在反射型XSS。

UEditor 在插入超链接的时候，鼠标移动到超链接上 点击时存在反射型XSS。

UEditor 在插入超链接的时候，鼠标移动到超链接上 点击时存在反射型XSS。

图片转存的使用了flash ，大部分浏览器都快要禁用flash , 使用什么替换这个 flash 呢

repo: fex-team/ueditor


text:
作者你好，请问结合webkitdirectory做文件夹上传的话好不好实现？

可否提供下思路，或者官方有没有考虑过添加这个功能，谢谢~

正在做这个case，有木有demo可以看啊

add以后,webkitRelativeDirectory都没了啊，求解救啊

不好意思，最近没有查收gmail，例子挺简单的，大致过程如下

$('#webkitdirectory').on('change', function() {
// 选择文件夹之后将获取到的FileList添加进uploader
var files = $('#webkitdirectory').prop('files');
uploader.addFiles(files);
});
uploader.on('uploadBeforeSend', function(object, data, headers) {
// 如果是webkitdirectory控件选择的文件，会包含webkitRelativePath属性，添加进formData发送
data.relativepath = object.file.source.source.webkitRelativePath ?
object.file.source.source.webkitRelativePath : '';
});
这样在上传请求的formData中就会有 relativepath
这个参数了，服务端可以根据这个参数来创建相对目录，实现上传文件夹的效果，你可以根据自己的业务场景来修改
2015-08-26 21:23 GMT+08:00 369857519 notifications@github.com:

add以后,webkitRelativeDirectory都没了啊，求解救啊
—
Reply to this email directly or view it on GitHub
https://github.com/fex-team/webuploader/issues/385#issuecomment-135016905
.

返回的webkitRelativePath是空的

webkitRelativePath只能在选择文件夹的时候使用吗？在拖拽文件的时候可以使用吗？

拖拽文件夹拿不到relativepath，要通过webkitdirectory选择才可以
On Mon, Mar 28, 2016 at 4:47 PM, 谢燕益 notifications@github.com wrote:

webkitRelativePath只能在选择文件夹的时候使用吗？在拖拽文件的时候可以使用吗？
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/fex-team/webuploader/issues/385#issuecomment-202306253

authors: 369857519 mailsurfie speakout xieyanyi

repo: fex-team/webuploader


text:
如何在用户选择文件个数超过限制时进行提示？

比如说alert一个信息，是否有这样的callback函数？谢谢！

已经搞定


text:
Estudo sobre a biblioteca TensorFlow

Instalação: TensorFlow https://www.tensorflow.org/install/
Tutorias: https://www.tensorflow.org/tutorials/

https://www.datacamp.com/community/tutorials/tensorflow-tutorial
https://www.youtube.com/watch?v=2FmcHiLCwTU

Galera, olhem outras soluções mais simples de implementar. o Keras eh uma boa alternativa e abstrai bastante o tensor flow

authors: RochaCarla marcos-mv


text:
(#51) Alterando a aplicação para receber uma lista de paths

Co-authored-by: Leandro Silva Leanddro13@users.noreply.github.com
Descrição
Adição de recurso para gerar certificados em massa através de listas de paths nos arquivos "certificado.py", "html2pdf.py" e "main.py" para melhorar a funcionalidade da aplicação.
(#51)
Tipo de alteração

[x] Melhoria de funcionalidade
[ ] Esta alteração requer uma atualização da documentação

Lista de controle:

[x] Meu código segue as diretrizes de estilo deste projeto
[x] Realizei uma auto-revisão do meu próprio código
[ ] Minhas alterações não geram novos avisos
[x] Verifiquei meu código e corrigi qualquer erro de ortografia
[x] Mudanças foram revisadas por pelo menos um par
[x] A aplicação foi testada e está funcionando corretamente

Observação:
Fazendo o merge entre "51-lista-paths" e "path" em uma branch terciária para resolver os conflitos.

Conflitos resolvidos


text:
How to return errors?

Hi there!
Please provide code for returning errors with custom codes
For example -31319

How to return this like exceptions ?
  "error" : {         "code" : -31050,         "message" : {             "ru" : "Номер телефона не найден",             "uz" : "Raqam ro'yhatda yo'q",             "en" : "Phone number not found"         },         "data" : "phone"     },     "result" : null,     "id" : 2032

bump, stuck going through the code to try to solve my error.
InvalidJsonRpcFormatException in ResponseParser.php line 129: Invalid Request: Params must be an array
Impossible to debug with the library.

throw new \JsonRPC\Exception\ResponseException($message, $code, $previousException, $data);

authors: Elycin Fayozjon zored

repo: fguillot/JsonRPC


text:
Adding section on Molecule testing

@noplanman , can you see if you can make it work with this really essential information added?

Seems simple enough, thanks.
I do get this however, when trying to run molecule test.
Am I missing something basic and obvious here?
ERROR! the role 'borgbackup' was not found in /Users/noplanman/Projects/Ansible/ansible-role-borgbackup/molecule/default/roles:/Users/noplanman/.cache/molecule/ansible-role-borgbackup/default/roles:/Users/noplanman/Projects/Ansible:/Users/noplanman/Projects/Ansible/ansible-role-borgbackup/molecule/default

The error appears to be in '/Users/noplanman/Projects/Ansible/ansible-role-borgbackup/molecule/default/playbook.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - role: borgbackup
      ^ here

ERROR:

@noplanman ,
I decided to set up my env from scratch and was not able to reproduce your situation.
Question: are you running this from the root path of the role? See my command history below and see if it answers some questions:
papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) > virtualenv -p python3 ~/.venv/fiaasco-docu
Already using interpreter /usr/bin/python3
...
Installing setuptools, pkg_resources, pip, wheel...done.
papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) > source ~/.venv/fiaasco-docu/bin/activate
(fiaasco-docu) papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) > pip3 install -r requirements.txt
Processing /home/dieter/.cache/pip/wheels/72/33/3c/64c1767c0ddcb1c39cea29f63d7033d846e9c234105b3dae92/ansible-2.9.6-py3-none-any.whl
Collecting molecule==2.22
...
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.9.6 ansible-lint-4.2.0 anyconfig-0.9.7 appdirs-1.4.3 arrow-0.15.5 aspy.yaml-1.3.0 attrs-19.3.0 bcrypt-3.1.7 binaryornot-0.4.4 cerberus-1.3.2 certifi-2020.4.5.1 cffi-1.14.0 cfgv-2.0.1 chardet-3.0.4 click-7.1.1 click-completion-0.5.2 colorama-0.4.3 cookiecutter-1.7.0 cryptography-2.9 distlib-0.3.0 docker-4.2.0 entrypoints-0.3 fasteners-0.15 filelock-3.0.12 flake8-3.7.9 future-0.18.2 git-url-parse-1.2.2 identify-1.4.14 idna-2.9 importlib-metadata-1.6.0 importlib-resources-1.4.0 jinja2-2.11.1 jinja2-time-0.2.0 mccabe-0.6.1 molecule-2.22 monotonic-1.5 more-itertools-8.2.0 nodeenv-1.3.5 packaging-20.3 paramiko-2.7.1 pathlib2-2.3.5 pathspec-0.8.0 pbr-5.4.5 pexpect-4.8.0 pluggy-0.13.1 poyo-0.5.0 pre-commit-1.21.0 psutil-5.7.0 ptyprocess-0.6.0 py-1.8.1 pycodestyle-2.5.0 pycparser-2.20 pyflakes-2.1.1 pynacl-1.3.0 pyparsing-2.4.7 pytest-5.4.1 python-dateutil-2.8.1 python-gilt-1.2.2 requests-2.23.0 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.0 sh-1.12.14 shellingham-1.3.2 six-1.14.0 tabulate-0.8.7 testinfra-3.4.0 toml-0.10.0 tree-format-0.1.2 urllib3-1.25.8 virtualenv-20.0.17 wcwidth-0.1.9 websocket-client-0.57.0 whichcraft-0.6.1 yamllint-1.21.0 zipp-1.2.0
(fiaasco-docu) papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) > molecule --version
molecule, version 2.22
(fiaasco-docu) papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) > molecule test
--> Validating schema /home/dieter/GIT/fiaasco/borgbackup/molecule/default/molecule.yml.
Validation completed successfully.
...
    ::test_include_exclude[ansible://default-client-debian-10] PASSED        [ 96%]
    ::test_pre_post_commands[ansible://default-client-debian-10] PASSED      [100%]

    ======================== 24 passed, 4 skipped in 29.94s ========================
Verifier completed successfully.
--> Scenario: 'default'
...
--> Pruning extra files from scenario ephemeral directory
(fiaasco-docu) papaya ~/GIT/fiaasco/borgbackup  (custom/documentation_improvements=) >

As a non-python person, maybe you could add the part of creating a virtual environment to the instructions too? :innocent:

authors: dverhelst noplanman

repo: fiaasco/borgbackup


text:
feat: Draft Add sections framework

This PR contains a first draft on sections level.
The structure given considers the section (for now only the generic section has been implemented) object that contains a combination of geometries (e.g. surfaces, points) and materials (constitutive relation). The section calculator is the object implementing the different computation algorithms. The integrator object is the one necessary for doing the integration of stresses in the section: two integrators have been implemented, Marin (default) and Fibre integration. The results are stored as proper dataclasses.
The implementation relys on shapely package.
Some limited usecase examples are reported.

Importing the necessary functions

from structuralcodes.materials.constitutive_laws import ParabolaRectangle, ElasticPlastic
from structuralcodes.sections._generic import GenericSection
from structuralcodes.sections._geometry import add_reinforcement, add_reinforcement_line, SurfaceGeometry
from shapely import Polygon

Creating constitutive law objects (note: the section framework supports both constitutive laws or material classes from where the constitutive law is available)

matC = ParabolaRectangle(30)
matS = ElasticPlastic(210000, 410)

Create a rectangular section with some reinforcement

rect = Polygon(((-100,-250),(100,-250),(100,250),(-100,250)))
geo = SurfaceGeometry(rect, matC)
geo = add_reinforcement(geo, (-60, 210), 16, matS)
geo = add_reinforcement(geo, (60, 210), 16, matS)

The output is the following:

Different ways of adding reinforcement:
Specifying a line and a number of reinforcements (spacing is automatically computed):

add_reinforcement_line(geo, (-60,-210), (60,-210), 16, matS, n = 4)

Specifying a line and the spacing of bars (number is automatically computed):
add_reinforcement_line(geo, (-60,-210), (60,-210), 16, matS, s = 30)

The function can be also nested
geo = add_reinforcement_line(
    add_reinforcement_line(geo, (-60, -210), (60, -210), 16, matS, n = 2),
    (-60,-210),
    (60,-210),
    8,
    matS,
    s = 20,
    first = False,
    last = False
)

Also, both spacing and number can be given:
add_reinforcement_line(
    add_reinforcement_line(geo, (60, -210), (60, 210), 12, matS, n = 2, s = 100),
    (-60, -210),
    (-60, 210),
    12,
    matS,
    n = 2,
    s = 100
)

5. Translate and other editing are included
geo = geo.translate(-100,-100)

Create the section (if integrator is not specified, Marin integration is used)

sec = GenericSection(geo, 'mySection', integrator = 'Fiber')

Compute gross properties (e.g. Area)

print(sec.gross_properties.area)

Compute bending strength

res = sec.section_analyzer.calculate_bending_strength(theta = 0, n = 0)
print(res.m_x)

Compute moment Curvature

res = sec.section_analyzer.calculate_moment_curvature(theta=0, n=0)
import matplotlib.pyplot as plt
plt.plot(res.chi, -res.my)

Analyze a steel section (like I-shaped)

fyk = 355
Es = 206000
Eh = 0.0
eps_su = 10.0e-2 #plastic strength
eps_su = fyk / Es #elastic strength

# H section
h = 300
b = 150
tf = 10.7
tw = 7.1
steel = ElasticPlastic(E=Es, fy=fyk, Eh=Eh, eps_su=eps_su)
# Geometry
sec_geom = Polygon(
    (
        (-b/2, -h/2),
        (b/2, -h/2),
        (b/2, -h/2+tf),
        (tw/2, -h/2+tf),
        (tw/2, h/2 - tf),
        (b/2, h/2-tf),
        (b/2, h/2),
        (-b/2, h/2),
        (-b/2, h/2 - tf),
        (-tw/2, h/2 - tf),
        (-tw/2, -h/2 + tf),
        (-b/2, -h/2 + tf),
    )
)
# Trick: create a CompundGeometry with just one SurfaceGeometry to make algorithms work
geo = CompoundGeometry([SurfaceGeometry(sec_geom, steel)])
# Section
sec = GenericSection(geo)

res_fiber = sec.section_analyzer.calculate_bending_strength(theta=0, n=0)
print(f'Mx = {res_fiber.m_x * 1e-6:.2f} kNm')
# Expected bending strength
J = 2/12 * (b * tf**3) + 2 * (tf*b) * (h/2-tf/2)**2 + 1/12 * (tw * (h-2*tf)**3)
W = J/(h/2)
print(f'Expected Mx,el = {fyk * W * 1e-6:.2f} kNm')
Wpl = 2 * (tf * b * (h/2 - tf/2) + (h/2-tf) * tw * (h/2-tf)/2)
print(f'Expected Mx,pl = {fyk * Wpl * 1e-6:.2f} kNm')

I've commented all your comments.
Almost everything is done, except some minor things that will be done later.

[ ] Drop functools.cache for version 3.8

@mortenengen in 3.8 tests fail because of cache not being found in module functool. Can you please assist me with this?

@mortenengen in 3.8 tests fail because of cache not being found in module functool. Can you please assist me with this?

Fixed in 6d8521d 😃

@mortenengen with 9a9d2c7 I included several tests on steel structures with I section. I have a problem: with parametrize if I un-comment more than 2-3 lines for possible testing the make test freezes.. I don't know if this a memory limit for my PC. Any suggestion?

@mortenengen with 9a9d2c7 I included several tests on steel structures with I section. I have a problem: with parametrize if I un-comment more than 2-3 lines for possible testing the make test freezes.. I don't know if this a memory limit for my PC. Any suggestion?

This was a strange one. There were tests that were either failing or freezing, and it was due to polygons that were joined through unions, but were still disconnected. Taking the union of disconnected geometries produces MultiPolygon and not Polygon, and therefore, the constructor of SurfaceGeometry raised a TypeError. I used the set_precision function from shapely to set the precision of the geometries to a very low number, and this made the tests pass 😃

In 1d64e13 I added constitutive laws to the Reinforcement class and swapped the ElasticPlastic objects with ReinforcementMC2010 in relevant tests.

authors: mortenengen talledodiego

repo: fib-international/structuralcodes


text:
🛑 Distribuidora RN is down

In b4df8c2, Distribuidora RN (https://www.distribuidorarn.com.ar) was down:

HTTP code: 521
Response time: 327 ms

Resolved: Distribuidora RN is back up in 6bcbc43 after 2 hours, 24 minutes.

repo: fideo/statusSites


text:
Add fontWeight to StyledTextSegment

I can't find this in the Figma documentation page, but according to the implementation fontWeight is a supported property of getStyledTextSegments
eg.

@james04321 @trev4ev

repo: figma/plugin-typings


text:
Tooltip alignment

Tooltip should align relative to actual cell content.
This has been brought up before, so let's look into ways to fix this.

Donate 💰 to fund this issue

You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
100% of the funding will be distributed between the Filament core team to run all aspects of the project.
Thank you in advance for helping us make maintenance sustainable!

Do you think this should be v4 instead, @danharrin?

I don't think so?

Cool, seems like a bug fix to me too.

authors: danharrin zepfietje

repo: filamentphp/filament


text:
Improving Table performance by caching eloquent queries

Description
The "problem"
In a ListRecords page, every time an Action is clicked the database query is re-executed.
(In fact this happens every time Livewire "talks" to the server)
A single action with a form seems to trigger the exact same query to the DB at least 3 times (4 times if it requires confirmation).
With high number of records and/or complex queries (e.g. where the sorting is done on a related table column) this has a significant impact in the user experience.
Proposed solution
This PR aims to improve the performance by leveraging Laravel's cache and avoid extra queries.
How it works:

this feature must be enabled explicitly by setting protected bool $shouldCacheQueries = true; in any Page that extends ListRecords
cache key is defined by the query's SQL
cache is tagged using the Component's id.
queries are cached by a default of 600 seconds
cache is flushed anytime an Action executes successfully, to reflect changes in the table.

Notes:

This solution relies on a cache driver that supports tagging, such as Redis.
If not available, queries are simply not cached.
If enabled without this support, will throw an exception.

I'd love to get some feedback, even if only to kick-off a discussion on how to improve such scenarios.
Code style

[X] composer cs command has been run.

Testing

[X] Changes have been tested.

Documentation

[ Not yet ] Documentation is up-to-date.

I personally suggest leaving this in userspace since there is currently no caching strategy for Eloquent queries in filament. You do have full control to implement query caching that way.

Hey, I agree that this can be a very subjective implementation, so worth a plugin or something. Thanks anyway!

I personally suggest leaving this in userspace since there is currently no caching strategy for Eloquent queries in filament. You do have full control to implement query caching that way.

Could you specify (high-level) how to achieve this in userspace?
Can't find anything in the docs that allows me to override the query "execution"....

All the methods you implement in this PR exist on the List page class, from the InteractsWithTable trait

I'll (re)check that.
Many thanks!!

authors: PascaleBeier danharrin tiagof


text:
Update static on infolist Resource method 05-viewing-records.md

Add static keyword to match the parent class method

Description

Visual changes

Functional changes

[ ] Code style has been fixed by running the composer cs command.
[ ] Changes have been tested to not break existing functionality.
[ ] Documentation is up-to-date.

It is. Thank you.


text:
Set the default EC lookback to 1

That will significantly reduce the chance that F3 causes EC to fork.

Discussed this with @jennijuju and I'm now more convinced we should just set it to something like 10. That means about a 5m delay, but that'll still get us finality in 6-7 minutes.

That means about a 5m delay, but that'll still get us finality in 6-7 minutes.

I would really like to avoid increasing time to finality if we can help it. Can we discuss this further at standup today please?

Of course. I'd definitely like to avoid it, I'm just worried because 2-3 length reverts aren't uncommon.

We discussed this and have settled on 4 epochs (2 minutes) based on:

The longest forks we saw were 3 blocks, but most were 1/2 blocks.
Forks longer than 4 blocks are likely due to the local node being on a strange fork. The only thing we're concerned about is the entire network switching and having the entire network do a 4 block revert is unlikely unless the network is really unhealthy.
Smaller delays likely have diminishing returns. With a 4 epoch lag, we'll likely come to consensus in a single round (likely less than 30 seconds, definitely less than a minute). We can almost certainly go faster, but we can easily revisit this later as it isn't consensus critical: everyone should try to start instances at the same time anyways, some participants will just propose longer/shorter chains each time.

authors: Stebalien masih


text:
Files 2.4.8 crashes when user immediately opens a new tab inside the current folder after loading

Description
I've been noticing this weird pattern in both Files, Files Preview, and Files Dev that wherever I open some folders inside my Desktop, Documents, etc., or even the drive folders, then if I open a subfolder immediately after the folder has been loaded, two things would happen.
One is that it would proceed as normal, and let me do my work.
Two is that it would immediately crash the app and restart.
Another sub-behavior is that, when I try to do the same thing on the app restart, it either does the same thing again or proceeds as stable. This would happen on random occasions when I try to do it.
I did some poking around Event Viewer to see what dependency was the culprit in crashing the app, and without fail, it's Microsoft.UI.Xaml.dll that's causing the crash every time.
Here's a sample of Event Viewer logs:
Faulting application name: Files.exe, version: 1.0.0.0, time stamp: 0x6377ba57
Faulting module name: Microsoft.UI.Xaml.dll, version: 3.0.0.2212, time stamp: 0x7dc2efab
Exception code: 0xc000027b
Fault offset: 0x00000000007cd8ec
Faulting process id: 0x0x6654
Faulting application start time: 0x0x1D91A7A87965819
Faulting application path: C:\Program Files\WindowsApps\49306atecsolution.FilesUWP_2.4.8.0_x64__et10x9a9vyk8t\Files.App\Files.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.UI.Xaml.dll
Report Id: 0ed41aa5-461f-4913-a3fa-5b3bbe2e2786
Faulting package full name: 49306atecsolution.FilesUWP_2.4.8.0_x64__et10x9a9vyk8t
Faulting package-relative application ID: App
Steps To Reproduce

Open the Files app on your PC.
Then open a folder in a new tab (Documents, drive, anything that has a lot of folders)
Immediately, after it loads, open your desired folder again, in a new tab.

Video reproduction:
AUDIO WARNING: PLEASE MUTE THE AUDIO ON SOME FOOTAGES. I don't want to destroy your ears.
https://drive.google.com/file/d/14-VR3bMmNg-VxxK-7hMwJUdtfAYvgInU/view?usp=share_link
Normal behavior when I did the steps to reproduce the issue.
https://drive.google.com/file/d/1aeXKV253tfQZrFhPJA0TfAVPN0W_jQ_M/view?usp=sharing
The buggy behavior. (it's handheld footage because it won't show under OBS 🤣 )
Steps to fix
Not applicable.
Files Version
2.4.8.0
Windows Version
Windows 11 Dev Channel Build Version	10.0.25267
Relevant Assets/Logs
debug.log

Is this still an issue in the preview version? https://files.community/download/preview

Is this still an issue in the preview version? https://files.community/download/preview

As of now @yaira2 , in Version: 2.4.12.0, I haven't reproduced the bug yet.
Will let you know once I have done it again

repo: files-community/Files


text:
Code Quality: Rename "Files.App (Package)" to "Files.Package" in the directory tree

Description
It's unnecessary and somewhat confusing to have the name "Files.App (Package)" in the directory tree (src). It should better be named Files.Package to match the configuration manager.
Concerned code
N/A
Gains

Better understanding of folder structure
Developer will understand the link between "Files.App (Package)" and "Files.Package" as it appears in the editor.

Requirements

Rename directory "Files.App (Package)" to "Files.Package"

Comments
No response

moving appxmanifest to another place would break the auto update

To rename, Files.App.Package makes more sense but we'd not rename or move until msixbundle is supported in the single packing project.

To rename, Files.App.Package makes more sense but we'd not rename or move until msixbundle is supported in the single packing project.

Yes you're right, like in FluentHub. However, that's how it currently is (Files.Package in Configuration Manager)

https://github.com/files-community/Files/pull/12475#issuecomment-1566150396

It's possible to publish a package from a single package project though, right?

Bundles aren't supported yet


text:
Focus loss in detail pane

The bug
When you click outside the information area in the detail pane (the area AFTER the last column) you lose focus  and keyboard navigation with up/down or left/right arrows doesnt work anymore. You have to effectively tab through all the controls to get back to the detail list. Shift+Tab is a shorter path, but still there are a few controls to shift+tab through to get back.
To Reproduce
Select an item in detail view, click in the empty area after the last column (Size usually), the selected item loses selection and focus, keyboard navigation is no longer possible.
Expected behavior
Keep the input focus on the detail list and return selecting an item with up/down arrows.
Desktop (please complete the following information):

OS Version: Windows 10 Home, Version 20H2, OS Build 19042.746, Windows Feature Experience Pack 120.2212.551.0
App version: 1.0.0.0
Hardware:
Processor Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 1.99 GHz
Installed RAM 12.0 GB (11.9 GB usable)
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Additional context
Compare with default behaviour of the Windows Explorer, focus always returns to the detail list when using the arrow keys.
Log file
Nothing useful in them related to this issue.

This issue should be resolved with #7425