text:
Fix conversion of file to unicode

Currently most of the code does this;
ROOT_DIR = unicode(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Which will fail with the following error when
tansell@tansell-z620-l2:~/work/☃/luci-py/client/tests$ python file_path_test.py
Traceback (most recent call last):
  File "file_path_test.py", line 17, in <module>
    BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

The correct way to do what this line is trying to do is;
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(
    __file__.decode(sys.getfilesystemencoding()))))

As you want all your paths to be unicode, we should probably also audit all the ROOT_DIR values to do this decoding too.

Here is the current output of the tests when running with a unicode character in your path;
Running presubmit commit checks ...
Running /usr/local/google/home/tansell/work/☃/luci-py/PRESUBMIT.py
Running /usr/local/google/home/tansell/work/☃/luci-py/client/PRESUBMIT.py
INFO:PRESUBMIT:Running pylint on 87 files

** Presubmit Messages **
Pylint (87 files using ['--disable=cyclic-import'] on 32 cores) (5.06s)

Pylint (87 files using ['--disable=all', '--enable=cyclic-import']) (5.85s)

libs/logdog/tests/bootstrap_test.py (0.05s)

libs/logdog/tests/stream_test.py (0.06s)

libs/logdog/tests/streamname_test.py (0.04s)

libs/logdog/tests/varint_test.py (2.59s)

tests/isolate_format_test.py (0.09s)

tests/isolate_smoke_test.py (6.53s)

tests/isolated_format_test.py (0.17s)

tests/large_test.py (3.70s)

tests/logging_utils_test.py (0.20s)

tests/lru_test.py (0.07s)

tests/net_test.py (0.16s)

tests/run_isolated_test.py (0.34s)

tests/subprocess42_test.py (6.59s)

tests/swarming_test.py (0.31s)

tests/threading_utils_test.py (0.74s)

tests/trace_inputs_smoke_test.py (0.09s)

tests/url_open_timeout_test.py (1.93s)

tests/zip_package_test.py (0.20s)

third_party/chromium/natsort_test.py (0.07s)

** Presubmit ERRORS **
tests/file_path_test.py (0.04s) failed
Traceback (most recent call last):
  File "tests/file_path_test.py", line 17, in <module>
    BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

tests/isolate_test.py (0.07s) failed
Traceback (most recent call last):
  File "tests/isolate_test.py", line 17, in <module>
    ROOT_DIR = unicode(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

tests/isolateserver_test.py (0.90s) failed
test_policies_active_trimming (__main__.DiskCacheTest) ... ok
test_policies_fit (__main__.DiskCacheTest) ... ok
test_policies_free_disk (__main__.DiskCacheTest) ... ok
test_policies_too_much (__main__.DiskCacheTest) ... ok
test_download_isolated (__main__.IsolateServerDownloadTest) ... ok
test_download_two_files (__main__.IsolateServerDownloadTest) ... FAIL
test_contains_format_failure (__main__.IsolateServerStorageApiTest) ... ok
test_contains_network_failure (__main__.IsolateServerStorageApiTest) ... ok
test_contains_success (__main__.IsolateServerStorageApiTest) ... ok
test_fetch_failure (__main__.IsolateServerStorageApiTest) ... ok
test_fetch_offset_bad_header (__main__.IsolateServerStorageApiTest) ... ok
test_fetch_offset_success (__main__.IsolateServerStorageApiTest) ... ok
test_fetch_success (__main__.IsolateServerStorageApiTest) ... ok
test_push_failure_finalize (__main__.IsolateServerStorageApiTest) ... ok
test_push_failure_upload (__main__.IsolateServerStorageApiTest) ... ok
test_push_success (__main__.IsolateServerStorageApiTest) ... ok
test_server_capabilities_success (__main__.IsolateServerStorageApiTest) ... ok
test_push_and_fetch (__main__.IsolateServerStorageSmokeTest) ... ok
test_push_and_fetch_gzip (__main__.IsolateServerStorageSmokeTest) ... ok
test_synchronous_push (__main__.IsolateServerStorageSmokeTest) ... ok
test_synchronous_push_gzip (__main__.IsolateServerStorageSmokeTest) ... ok
test_upload_items (__main__.IsolateServerStorageSmokeTest) ... ok
test_upload_items_gzip (__main__.IsolateServerStorageSmokeTest) ... ok
test_async_push (__main__.StorageTest) ... ok
test_async_push_generator_errors (__main__.StorageTest) ... ok
test_async_push_upload_errors (__main__.StorageTest) ... ok
test_batch_items_for_check (__main__.StorageTest) ... ok
test_get_missing_items (__main__.StorageTest) ... ok
test_upload_tree (__main__.StorageTest) ... ok
test_archive_directory (__main__.TestArchive) ... INFO:root:rmtree(/tmp/isolateserver8fXvYf)
DEBUG:root:make_tree_deleteable(/tmp/isolateserver8fXvYf)
INFO:root:rmtree(/tmp/isolateserverndePMx)
DEBUG:root:make_tree_deleteable(/tmp/isolateserverndePMx)
ok
test_archive_directory_envvar (__main__.TestArchive) ... INFO:root:rmtree(/tmp/isolateserver5gjjz9)
DEBUG:root:make_tree_deleteable(/tmp/isolateserver5gjjz9)
INFO:root:rmtree(/tmp/isolateserver7aqoJA)
DEBUG:root:make_tree_deleteable(/tmp/isolateserver7aqoJA)
ok
test_archive_duplicates (__main__.TestArchive) ... INFO:root:Waiting for all threads to die...
INFO:root:Done.
ok
test_archive_files (__main__.TestArchive) ... INFO:root:rmtree(/tmp/isolateserverBaTtbU)
DEBUG:root:make_tree_deleteable(/tmp/isolateserverBaTtbU)
ok
test_archive_no_server (__main__.TestArchive) ... ok
test_bad_zip_file (__main__.TestZipCompression)
Verify decompressing broken file raises IOError. ... ok
test_compress_and_decompress (__main__.TestZipCompression)
Test data === decompress(compress(data)). ... ok
test_zip_bomb (__main__.TestZipCompression)
Verify zip_decompress always returns small chunks. ... ok

======================================================================
FAIL: test_download_two_files (__main__.IsolateServerDownloadTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/isolateserver_test.py", line 839, in test_download_two_files
    self.assertEqual(expected, actual)
AssertionError: {'/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/path/to/a': 'C [truncated]... != {u'/usr/local/google/home/tansell/work/\u2603/luci-py/client/path/to/a': 'Coucou [truncated]...
- {'/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/path/to/a': 'Coucou',
?                                        ^^ ^^^^^^^

+ {u'/usr/local/google/home/tansell/work/\u2603/luci-py/client/path/to/a': 'Coucou',
?  +                                      ^ ^^

-  '/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/path/to/b': 'Bye Bye'}
?                                        ^^ ^^^^^^^

+  u'/usr/local/google/home/tansell/work/\u2603/luci-py/client/path/to/b': 'Bye Bye'}
?  +                                      ^ ^^

----------------------------------------------------------------------
Ran 37 tests in 0.733s

FAILED (failures=1)

tests/on_error_test.py (0.92s) failed
test_shell_out_crash (__main__.OnErrorServerTest) ... FAIL
test_shell_out_crash_server_down (__main__.OnErrorServerTest) ... FAIL
test_shell_out_exception (__main__.OnErrorServerTest) ... FAIL
test_shell_out_exception_no_msg (__main__.OnErrorServerTest) ... FAIL
test_shell_out_hacked (__main__.OnErrorServerTest) ... ok
test_shell_out_report (__main__.OnErrorServerTest) ... FAIL
test_no_http (__main__.OnErrorTest) ... ok
test_report (__main__.OnErrorTest) ... ok

======================================================================
FAIL: test_shell_out_crash (__main__.OnErrorServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/on_error_test.py", line 314, in test_shell_out_crash
    self.assertEqual(expected, re.sub(r' \d+', ' 0', out))
AssertionError: 'Traceback (most recent call last):\n  File "on_error_test.py", line 0, in <module>\n    sys.exit(run_shell_out(sys.argv[2], sys.argv[3]))\n  File "on_error_test.py", line 0, in run_shell_out\n    raise ValueError(\'Oops\')\nValueError: Oops\nSending the crash report ... done.\nReport URL: https://localhost/error/1234\nProcess exited due to exception\nOops\n' != 'Traceback (most recent call last):\n  File "on_error_test.py", line 0, in <module>\n    sys.exit(run_shell_out(sys.argv[2], sys.argv[3]))\n  File "on_error_test.py", line 0, in run_shell_out\n    raise ValueError(\'Oops\')\nValueError: Oops\nSending the crash report ...Error in atexit._run_exitfuncs:\nTraceback (most recent call last):\n  File "/usr/lib/python2.7/atexit.py", line 0, in _run_exitfuncs\n    func(*targs, **kargs)\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _check_for_exception_on_exit\n    \'\'.join(traceback.format_tb(last_tb)))\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _report_exception\n    \'env\': _serialize_env(),\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _serialize_env\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in <genexpr>\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\nUnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xe2 in position 0: ordinal not in range(128)\nError in sys.exitfunc:\nTraceback (most recent call last):\n  File "/usr/lib/python2.7/atexit.py", line 0, in _run_exitfuncs\n    func(*targs, **kargs)\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _check_for_exception_on_exit\n    \'\'.join(traceback.format_tb(last_tb)))\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _report_exception\n    \'env\': _serialize_env(),\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _serialize_env\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in <genexpr>\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\nUnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xe2 in position 0: ordinal not in range(128)\n'

======================================================================
FAIL: test_shell_out_crash_server_down (__main__.OnErrorServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/on_error_test.py", line 358, in test_shell_out_crash_server_down
    self.assertEqual(expected, re.sub(r' \d+', ' 0', out))
AssertionError: 'Traceback (most recent call last):\n  File "on_error_test.py", line 0, in <module>\n    sys.exit(run_shell_out(sys.argv[2], sys.argv[3]))\n  File "on_error_test.py", line 0, in run_shell_out\n    raise ValueError(\'Oops\')\nValueError: Oops\nSending the crash report ... failed!\nProcess exited due to exception\nOops\n' != 'Traceback (most recent call last):\n  File "on_error_test.py", line 0, in <module>\n    sys.exit(run_shell_out(sys.argv[2], sys.argv[3]))\n  File "on_error_test.py", line 0, in run_shell_out\n    raise ValueError(\'Oops\')\nValueError: Oops\nSending the crash report ...Error in atexit._run_exitfuncs:\nTraceback (most recent call last):\n  File "/usr/lib/python2.7/atexit.py", line 0, in _run_exitfuncs\n    func(*targs, **kargs)\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _check_for_exception_on_exit\n    \'\'.join(traceback.format_tb(last_tb)))\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _report_exception\n    \'env\': _serialize_env(),\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _serialize_env\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in <genexpr>\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\nUnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xe2 in position 0: ordinal not in range(128)\nError in sys.exitfunc:\nTraceback (most recent call last):\n  File "/usr/lib/python2.7/atexit.py", line 0, in _run_exitfuncs\n    func(*targs, **kargs)\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _check_for_exception_on_exit\n    \'\'.join(traceback.format_tb(last_tb)))\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _report_exception\n    \'env\': _serialize_env(),\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in _serialize_env\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\n  File "/usr/local/google/home/tansell/work/\xe2\x98\x83/luci-py/client/utils/on_error.py", line 0, in <genexpr>\n    (k, v.encode(\'ascii\', \'replace\')) for k, v in os.environ.iteritems())\nUnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xe2 in position 0: ordinal not in range(128)\n'

======================================================================
FAIL: test_shell_out_exception (__main__.OnErrorServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/on_error_test.py", line 230, in test_shell_out_exception
    out = self.call(httpd.url, 'exception', 0)
  File "tests/on_error_test.py", line 177, in call
    self.assertEqual(returncode, proc.returncode)
AssertionError: 0 != 1

======================================================================
FAIL: test_shell_out_exception_no_msg (__main__.OnErrorServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/on_error_test.py", line 265, in test_shell_out_exception_no_msg
    out = self.call(httpd.url, 'exception_no_msg', 0)
  File "tests/on_error_test.py", line 177, in call
    self.assertEqual(returncode, proc.returncode)
AssertionError: 0 != 1

======================================================================
FAIL: test_shell_out_report (__main__.OnErrorServerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/on_error_test.py", line 199, in test_shell_out_report
    out = self.call(httpd.url, 'report', 0)
  File "tests/on_error_test.py", line 177, in call
    self.assertEqual(returncode, proc.returncode)
AssertionError: 0 != 1

----------------------------------------------------------------------
Ran 8 tests in 0.758s

FAILED (failures=5)

tests/run_isolated_smoke_test.py (0.04s) failed
Traceback (most recent call last):
  File "tests/run_isolated_smoke_test.py", line 13, in <module>
    ROOT_DIR = unicode(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

tests/trace_inputs_test.py (0.04s) failed
Traceback (most recent call last):
  File "tests/trace_inputs_test.py", line 13, in <module>
    BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

Presubmit checks took 17.7s to calculate.

I've uploaded a patch which fixes the problem at https://codereview.chromium.org/2093593002/

repo: luci/luci-py


text:
fix: sessions/basic-api/sqlite.md

Database row references a non-existent index (3). Changing it to 1 (user_id).

Row[3] is user.id?

source: gharchive/pull-request

authors: greglearns pilcrowonpaper

repo: lucia-auth/lucia

license_type: permissive

license_source: github-api


text:
[Icon Requests from Feather] drink icons

As per https://github.com/lucide-icons/lucide/issues/119 and https://github.com/feathericons/feather/issues/965:

Nice icons, love them.
I think we should not too go to specific with some icons. So I would say. Beer wine and one normal glass.

Thanks, and you're right, one icon per type is plenty.

source: gharchive/issue

authors: ericfennis karsa-mistmere

repo: lucide-icons/lucide

license: ISC


text:
Adding Notebooks with Colab links

Adding notebooks
The purpose of all that is to make it super easy for others to quickly experiment and test out using a notebook like Google Colab.
The notebook contains the exact same code logic written in the main repo's README file.

I have added a directory called notebooks.
Added 2 notebooks namely: training and inference
The notebooks have a clickable link to Google Colab.

I've cleaned up some silly errors from the last versions and added some code separations.

repo: lucidrains/phenaki-pytorch

license: MIT


text:
Different transformer implementations with huggingface vit

Hi Phil, thanks for the great repo.
I compared your implementation of ViT with huggingface's (https://github.com/huggingface/transformers/blob/master/src/transformers/models/vit/modeling_vit.py) and found some subtle differences.
In particular:

in the attention module, huggingface's vit has a dropout after softmax (i.e., to the attention probability matrix). But yours doesn't (unless there's a linear projection layer).
in the FFN, after the first linear transformation, yours have a dropout but huggingface's doesn't have.
The default dropout rate you adopted is 0.1, whereas huggingface vit is 0.15.
I wonder have you tried different ways of dropout? Would they produce any noticeable differences?
Thank you very much.

BTW the transformer layers used by huggingface's vit is basically a verbatim copy of the transformer used in their Bert model.

I also checked rwightman's pytorch-image-models. The vision transformer he implemented has all the dropouts. The dropout rate is 0.1, the same as yours.

Do these fine details matter so much?

Won't have big impact, but maybe some fraction of a point. I don't have enough computation resources to find out...

authors: askerlee shabie

repo: lucidrains/vit-pytorch


text:
🛑 Cam-85 is down

In 580fb00, Cam-85 (http://lucien.kerl.io:85) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cam-85 is back up in e8bc614.

repo: lucienkerl/status


text:
How to change the player group?

Pointed place without effect
Player is still in original group
plz help me fix this problem
be  deeply grate ful

setPrimaryGroup only works if the player has the group. See https://gitlab.com/nightborn_mc/bungee_side_plugins/blob/master/src/main/kotlin/me/voidcrafted/bungeeplugins/DiscordAuthenticator.kt#L37 for an example. If you wanted to set the group, replace my predicate in clearMatching with one that returns true if the node is a group node

https://github.com/lucko/LuckPerms/wiki/Developer-API:-Usage#modifying-usergroup-data

thank you

authors: BrainStone Eustiya codingJWilliams

repo: lucko/LuckPerms


text:
Add an option to limit the number of prefix's that can be shown

As title says. Adding a config option that allows you to limit the number of prefix's that'll be shown in game. Example being if you have 7 prefix groups or tracks listed in your config, LP limits it to only show the highest 3 that a player has.

This is possible already.
https://github.com/lucko/LuckPerms/wiki/Prefix-&-Suffix-Stacking

I don’t think you understood what’s been asked here.
The thing is, imagine you have like 10 lines for your prefix stacking. For some players that’ll result in only a few prefix and others get more than let’s say 3. Now the request is to add a way to limit the sum of shown prefixes to 3 or less. No matter if there would be more than 3.

MrCreepysBro  Today at 10:28
Luck, I guess you didn't understand what I meant in my GitHub suggestion. I'm fully aware about the stacking feature. However, what I was suggesting was if you have 6 groups on your stacking format, and someone is apart of 5 of them, having an option to only show the highest 3 rather than all 6 prefixes since currently in the plugin, there is no way to do that
I asked here before if it was possible and was told from one of your mods that it wasn't and to make a suggestion on GitHub. Hope that clears it up.

Luck  Today at 10:54
Right ok I see what you mean
I can't think of a way to implement that easily in the current stacking system
And it seems quite niche if I'm honest

Open to suggestions :)

Maybe specifying the same key (like highest) has the effect that the second takes the second best match, etc.

My opinion is that this is still too niche.
Would be possible to do through the API, but not something I think that belongs in the main plugin. A quality PR implementing this functionality would likely still be accepted, but it's not something I'm going to work on. :)

authors: BrainStone Tsugeta7 lucko


text:
Maven central LuckPermsAPI is out of date.

I saw that someone made an issue about WorldCalculator (#2119) before but that issue was closed like a month ago but it's still throwing warnings in the newest 5.0.139 version, at least it does for me. The problem is I didn't use to throw any warning before, but my console is filled with:
[LuckPerms] An exception was thrown by me.lucko.luckperms.bukkit.context.WorldCalculator whilst calculating the context of subject CraftPlayer{name=Thinkverse}
java.lang.NoSuchMethodError: net.luckperms.api.context.Context.isValidValue(Ljava/lang/String;)Z
 	at me.lucko.luckperms.bukkit.context.WorldCalculator.calculate(WorldCalculator.java:60)
 	at me.lucko.luckperms.bukkit.context.WorldCalculator.calculate(WorldCalculator.java:47)

Every time I log in to the server it throws a warning, every time I run a LuckPerms command it throws a warning, is there a fix for this? Because it seems to bug out my whole server.
I tried regenerating the config files, rebuilding a new 1.15.2 Spigot server, re-downloading LuckPerms 5.0.139, nothing works, it's getting annoying.

Any permissions I set don't seem to get persisted either, and this is using a newly generated config, default h2, on a fresh and latest build of Spigot 1.15.2 running the newest LuckPerms 5.0.139

I've now tested previous versions of LuckPerms through 5.0.130 -> 5.0.139 and the issue is persistent on all those versions, all of them throw the same exception.
java.lang.NoSuchMethodError: net.luckperms.api.context.Context.isValidValue

It seems the API for LuckPerms on maven central hasn't been updated. 👍

Try installing the legacy api extension and see if it resolves the issue. https://github.com/lucko/LuckPerms/wiki/Upgrading-from-v4-to-v5#installing-the-extension

I'm running LuckPerms 5 on both the main plugin and the API, the legacy extension is for LuckPerms 4? How's that gonna help when the LuckPerms 5 API is out of date on maven, it hasn't been updated since November.
https://search.maven.org/artifact/net.luckperms/api

Just try installing the extension and see if it works. Some plugins that make use of the LuckpermsAPI have not updated to use the v5 API. If installing it does not fix the issue, then it's an issue with the Luckperms V5 API.

I'm testing the new API, it's loading directly in from maven, using the net.luckperms:api:5.0 but sure I'll try it I guess.

java.lang.NoSuchMethodError: net.luckperms.api.context.Context.isValidValue

This error is caused by a plugin shading the LuckPerms API into its jar.

It seems the API for LuckPerms on maven central hasn't been updated

It only gets updated periodically - this isn't problematic so long as plugins don't shade it, and just allow the LP jar to provide it at runtime.

Thank you @lucko with that information I noticed I'd missed the <scope> in my pom file, thank you for a useful answer. 😄 👍

authors: OmegaWeaponDev lucko thinkverse


text:
Docstring support

I have a feature request for this project that I would like to propose. I think, the addition of this feature would greatly enhance the project's functionality and usability.
Description
The proposed feature is to incorporate a standardized function, such as doc, that enables retrieving the docstrings for classes and methods and seamlessly inserting them into the UML diagram. This addition would significantly contribute to clarifying the purpose and functionality of classes within the UML representation. It would provide developers with a convenient and consistent way to access the documentation, resulting in improved understanding and maintainability.
Previous Status
Furthermore, I am unsure whether this feature has been requested previously. If it has, I kindly request information regarding its current status or any ongoing efforts to implement it.

Duplicate of https://github.com/lucsorel/py2puml/issues/34.
Thank you for posting feature requests, but please check beforehand whether a similar issue already exists. There are only 10 open issues, it is easy to check :smiley:
You can contribute on #34 to suggest how the docstring of a module and a data structure (class, enum, dataclass, etc.) should appear in the generated PlantUML documentation (see https://github.com/lucsorel/py2puml/issues/34#issuecomment-1352265035), that would help implementing something satisfying. Thanks :pray:

authors: ShovanSarker lucsorel


text:
ioredis blpop command does not work in clustered redis instance

I am using redis cluster instance as below:
var client = new Redis.Cluster([{
port: 6380,
host: '127.0.0.1'
}, {
port: 6381,
host: '127.0.0.1'
}, {
port: 6382,
host: '127.0.0.1'
}, {
port: 6383,
host: '127.0.0.1'
}, {
port: 6384,
host: '127.0.0.1'
}, {
port: 6385,
host: '127.0.0.1'
}], {
maxRedirections: 1 // This one changed intentionally so that issue can reproduced at the earliest
});
client.blpop('{q}:email:jobs', 0, console.log) // I issued this command
Inside sendCommand method I have issued a console log so as to see which command is being issued as below:
Redis.prototype.sendCommand = function (command, stream) {
console.log('Inside sendCommand method:', command)
Got the output as below:
Note: I have placed only blpop command which I have issued and ignore all other commands.
Inside sendCommand method: Command {
name: 'blpop',
transformed: true,
isCustomCommand: false,
replyEncoding: 'utf8',
errorStack: undefined,
args: [ '{q}:email:jobs', '0' ],
callback: [Function: bound consoleCall],
resolve: [Function],
reject: [Function],
promise: Promise {  },
keys: [ '{q}:email:jobs' ],
slot: 11958,
__is_reject_overwritten: true }
Inside sendCommand method: Command {
name: 'blpop',
transformed: true,
isCustomCommand: false,
replyEncoding: 'utf8',
errorStack: undefined,
args: [ '{q}:email:jobs', '0' ],
callback: [Function: bound consoleCall],
resolve: [Function],
reject: [Function],
promise: Promise {  },
keys: [ '{q}:email:jobs' ],
slot: 11958,
__is_reject_overwritten: true }
err is: { ReplyError: MOVED 11958 127.0.0.1:6382
at parseError (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'blpop', args: [ '{q}:email:jobs', '0' ] } }
Error: Too many Cluster redirections. Last error: ReplyError: MOVED 11958 127.0.0.1:6382
at Cluster.handleError (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/ioredis/built/cluster/index.js:534:38)
at Command.command.reject (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/ioredis/built/cluster/index.js:412:23)
at Redis.exports.returnError (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/ioredis/built/redis/parser.js:61:26)
at JavascriptRedisParser.returnError (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/ioredis/built/redis/parser.js:20:19)
at JavascriptRedisParser.execute (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/redis-parser/lib/parser.js:542:14)
at Socket. (/Users/manasamishra/xlabprojects/manas-fork/redis-cluster-ioredis/node_modules/ioredis/built/redis/event_handler.js:107:26)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
I believe this thing is failing in 2nd time as I have passed maxRedirections as 1.

Hi! I'm had the same issue. Is any updates?

Also want to add that BLPOP command blocks connection until something new will be added to list.
And it looks like library use same connection to update slots https://github.com/luin/ioredis/blob/master/lib/cluster/index.ts#L611, and as connection is blocked by BLPOP command there will be timeout and library will close this connection after timeout.

@luin Any update on the above issue?

@luin is it reasonable to use a separate connection to discover cluster and slots ?

Sorry for the late response. MOVED errors are caused by the timeouts when refreshing slots with the connection that in the block mode. @manasa-ei I submitted a pull request for this issue to use a separate connection to refresh slots, as suggested by @RidgeA : https://github.com/luin/ioredis/pull/867. Could you test on it to see whether the issue has been solved?

Sorry for the late response. MOVED errors are caused by the timeouts when refreshing slots with the connection that in the block mode. @manasa-ei I submitted a pull request for this issue to use a separate connection to refresh slots, as suggested by @RidgeA : #867. Could you test on it to see whether the issue has been solved?

@luin It seems it is working good with a little modification such as referring timeout function from utils_1 I think it's only a merging issue. While merging this branch this needs to be taken care as the development is done on a previous version.
Please merge it as soon as possible it will help me and others a lot.

authors: RidgeA andrewkuk luin manasa-ei

repo: luin/ioredis

license: mit

license_source: bigquery


text:
Add possibility to configure cert duration

Hey.
This PR adds the possibility to configure the duration of the certificates which we need for our use-case.
Not sure how to bump the versions, do the app version follow the chart version? If it's incorrect just tell me how you version it and I can update.
This should be a non-breaking change as I added the previous values as default.

Hi @ONordander, thanks for this PR, and sorry for the late reply.
The idea sound good to me, I do have a few comments, though:

Add some documentation, probably under section Install infoblox-wapi webhook.
I think using the webhook prefix in the parameters is a bit confusing. webhook is defined in _helpers.tpl as helm helper functions. I suggest to rename the parameters in values.yaml like:

rootCACertificate:
  duration: "43800h"
servingCertificate:
  duration: "8760h"

And change their interpolation appropriately.
Other than that, looks good to me, although I haven't been able to test, and won't be able for a while (moving a couple of oceans apart at the moment!).

Hi @ONordander, thanks for this PR, and sorry for the late reply.
The idea sound good to me, I do have a few comments, though:
1. Add some documentation, probably under section [Install infoblox-wapi webhook](https://github.com/luisico/cert-manager-webhook-infoblox-wapi#install-infoblox-wapi-webhook).

2. I think using the `webhook` prefix in the parameters is a bit confusing. `webhook` is defined in `_helpers.tpl` as helm helper functions. I suggest to rename the parameters in `values.yaml` like:

rootCACertificate:
  duration: "43800h"
servingCertificate:
  duration: "8760h"

And change their interpolation appropriately.
Other than that, looks good to me, although I haven't been able to test, and won't be able for a while (moving a couple of oceans apart at the moment!).

Done, added a section for all the values as that made more sense to me.
Agree, done :)

I tested it locally with helm template -f values.yaml -n cert-manager .

Thanks @ONordander, LGTM, will merge

@ONordander Released as 1.5.2. Let me know if you have any problems. Thanks for your help. Luis

@ONordander Released as 1.5.2. Let me know if you have any problems. Thanks for your help. Luis

Worked very well, thanks :)

authors: ONordander luisico


text:
In "Interaction Modes", I can not control the state inside onclick

In interaction mode I'm trying to call onclick for each tree item and want to update state however can not.
This example is from your docs page;
function App() { const [start,setStart] = useState(false);   return (     <UncontrolledTreeEnvironment       dataProvider={new StaticTreeDataProvider(longTree.items, (item, data) => ({ ...item, data }))}       getItemTitle={item => item.data}       defaultInteractionMode={{         mode: 'custom',         createInteractiveElementProps: (item, treeId, actions, renderFlags) => ({           onClick: e => {           setStart(true);           console.log(start);             actions.focusItem();           },           onFocus: () => {             actions.focusItem();           },           tabIndex: !renderFlags.isRenaming ? (renderFlags.isFocused ? 0 : -1) : undefined,         }),       }}       viewState={{         ['tree-4']: {           expandedItems: ['Fruit', 'Meals'],         },       }}     >       <Tree treeId="tree-4" rootItem="root" treeLabel="Tree Example" />     </UncontrolledTreeEnvironment>   ); }
"start" state could be true on console log.
Desktop (please complete the following information):

OS: [e.g. iOS] Windows
Browser [e.g. chrome, safari] Chrome
Version [e.g. 22]

Hi! Looks like you are doing a state update with the set function of a useState hook, and then immediately afterwards reading the get property of the state. Updating the state will schedule a rerender in react, and react will internally only update the value for the next rerender. Btw even then, you need to make sure that the reference to the state variable is not affected by a stale closure. This is a peculiarity of react and not related to this library, and also by design by the react.

authors: bcburak lukasbach

repo: lukasbach/react-complex-tree


text:
Fixed Path issue

Fixed Path issue from /query => ?query
Description

Cool thanks for fixing this!

authors: lukePeavey nk-gears

repo: lukePeavey/quotable


text:
possibility to pass null on currentindex

Hi,
I'm using the SalomonBottomBar in a WEB app and it would be nice if it was possible to pass a null value to the currentindex.
This way none of the items would be selected.
When starting my application, I want to show a blank page with the app logo and no items selected.
The user then clicks on an item to go to the selected page.
Very nice Widget btw :)
Best,
eeBee

My bad,
Setting the currentIndex to -1, does exactly what I need.
Please ignore my request above

@eebeeDEV could you please close this issues, if you think it's resolved? Thanks :)

authors: Ahmadre eebeeDEV


text:
xmousebuttoncontrol: Update to version 2.19.2

Closes #5112

e9544b4 Chatty is something I am working on adding and forgot to move out of; it's not part of this PR though. sorry for the confusion.

As in other PR. Next PR which will not be opened with write access to the collaborators will be immediately closed.

repo: lukesampson/scoop-extras

license: Unlicense


text:
Document the security of scoop

I really like the user experience that this project provides.
What I miss is some safety analysis wiki page
I.e. something similar to that chocolatey has: https://chocolatey.org/security

Hi @lukesampson – any thoughts on this? I love scoop but share the concerns or uncertainties some might have around security of the whole system.

authors: keneo ymyke

repo: lukesampson/scoop

license: unlicense


text:
scoop search error from convertfrom-json

OS 1903
It seems that extra bucket is causing this error.
Similar to https://github.com/lukesampson/scoop/issues/2568 but removing extra bucket and adding it back doesn't do the trick.
❯ scoop search vim
convertfrom-json : 传入的数组无效，结尾多出了“,”。 (1238):
{
    "##": "Renaming the downloaded zip to 'sourceforge.net.zip' is a hack for the referer header. See dl()-function in \\lib\\install.ps1",
    "homepage": "https://www.msi.com/page/afterburner",
    "description": "Overclocking utility for graphics cards. Main features include GPU/Shader/Memory clock adjustment, advanced fan speed and GPU voltage control.",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.msi.com/page/website-terms-of-use"
    },
    "version": "4.6.1",
    "url": "https://download-eu2.guru3d.com/afterburner/%5BGuru3D.com%5D-MSIAfterburnerSetup461Build15561.zip#/sourceforge.net.zip",
    "hash": "4e59da5b73c5f290408851fea6e48b3b37dd6b089ae5598b3ccee43ea11fe603",
    "suggest": {
        "Visual C++ Redist 2008": "extras/vcredist2008",
        "RivaTuner Statistics Server": "extras/rtss",
        "MSI Kombustor": "extras/msikombustor",
        "FurMark": "extras/furmark"
    },
    "persist": "Profiles",
    "bin": "MSIAfterburner.exe",
    "pre_install": [
        "Expand-7zipArchive \"$dir\\MSIAfterburnerSetup*.exe\" -Removal",
        "Remove-Item \"$dir\\*\" -Include @('$PLUGINSDIR', 'Uninstall.exe.nsis', '$R0', 'Redist\\*.exe') -Recurse",
    ],
    "post_install": [
        "if(Test-Path \"$persist_dir\\AB_Profiles\") {",
        "    warn 'Migrating Afterburner profiles...'",
        "    Move-Item -Path \"$persist_dir\\AB_Profiles\\*\" -Destination \"$persist_dir\\Profiles\\\"",
        "    Remove-Item \"$persist_dir\\AB_Profiles\" -Recurse",
        "}"
    ],
    "shortcuts": [
        [
            "MSIAfterburner.exe",
            "MSI Afterburner"
        ]
    ],
    "checkver": {
        "url": "https://www.guru3d.com/files-details/msi-afterburner-beta-download.html",
        "regex": "Download ([\\d.]+) Stable/Final",
        "reverse": true
    },
    "autoupdate": {
        "url": "https://download-eu2.guru3d.com/afterburner/%5BGuru3D.com%5D-MSIAfterburnerSetup$cleanVersion.zip#/sourceforge.net.zip"
    },
    "notes": [
        "The 'RivaTuner Statistics Server' has been moved to it's own package.",
        "To install it run 'scoop install extras/rtss'.",
        "Your profiles will be migrated automatically."
    ]
}
所在位置 C:\Users\11103475\scoop\apps\scoop\current\lib\manifest.ps1:10 字符: 45
+ Get-Content $path -raw -Encoding UTF8 | convertfrom-json -ea stop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
'extras' bucket:
    wsl-terminal (0.8.13) --> includes 'vim.exe'

'main' bucket:
    gow (0.8.0) --> includes 'vim.exe'
    neovim (0.4.2)
    psutils (0.2018.08.04) --> includes 'vimtutor.ps1'
    vim (8.1.2058)
    vimtutor (0.2018.07.25)

Fixing in https://github.com/lukesampson/scoop-extras/pull/2865

Tried rm and add again. Still the same issue. Anything else should I do to get the latest extras bucket?

It hasn't been merged yet.

@Velgus Thx. Just notice it now.

The fix was merged

authors: Velgus linsui r15ch13 yzlnew


text:
BAC VER1 HIT BOX HURT BOX UNKNOWN12 UNKNOWN13

U C https://github.com/WydD/MoveTool/pull/1

Fixed in https://github.com/lullius/MoveTool/commit/96451e3092d7f098f689ca35f89e0779f3dd3c32
Closing.

authors: lullius toolassisted

repo: lullius/MoveTool


text:
feat(unocss): support css transformers

Description
Support for using Transformer.
Tested:

Variant Group
Directives

These transformers export wrong types, I'll try to fix them later by creating PR to upstream.
https://arethetypeswrong.github.io/?p=%40unocss%2Ftransformer-variant-group
https://arethetypeswrong.github.io/?p=%40unocss%2Ftransformer-directives
Related Issues

Check List

[x] Have you read the
CODE OF CONDUCT
[x] Have you read the document
CONTRIBUTING

[x] One pull request per feature. If you want to do more than one thing,
send multiple pull request.
[x] Write tests.
[x] Run deno fmt to fix the code format before commit.
[ ] Document any change in the CHANGELOG.md.

The magic-string has been moved to deps and transformers are enabled by default.

Thank you!

authors: kwaa oscarotero

repo: lumeland/lume


text:
refactor(plugins): named export

Description

Related Issues

Check List

[x] Have you read the
CODE OF CONDUCT
[x] Have you read the document
CONTRIBUTING

[x] One pull request per feature. If you want to do more than one thing,
send multiple pull request.
[ ] Write tests.
[x] Run deno fmt to fix the code format before commit.
[ ] Document any change in the CHANGELOG.md.

This is very cool. Thanks!


text:
Using Scriban with very large (millions of rows) data sets results in OutOfMemoryException

I'm evaluating if Scriban will be suitable for a project I'm working on, and am having trouble with very large data sets: millions of rows, dozens of columns, largely formatted dates and decimal values. It feels like I must be doing something wrong, because the memory usage numbers aren't at all what I would expect from the benchmarks here in the project documentation. With a test case of 10M rows and 30 columns, I get an OutOfMemoryException about halfway in... some time after crossing the 4 GB mark (as reported by Visual Studio's built-in diagnostic tools).
So two questions:

Could I be using the API incorrectly, resulting in this high memory usage?
Does Scriban provide a way to render directly to file rather than storing the render result in memory?

The default high level API through the Template.Render doesn't provide a way to do it, but you can achieve this by using the underlying API (TemplateContext).
TemplateContext provides two methods PushOutput/PopOutput. The PushOutput method can take a IScriptOutput. By default, there is always a top level implementation in TemplateContext using the implementation StringBuilderOutput but you can also push a different output TextWriterOutput with which you can use whatever TextWriter or even write your own IScriptOutput if you want. The reason for this Push/Pop model is that you can have intermediate results using a different output (typically used by include or the capture function) that can get re-injected later.
So simply pushing a new top level output to a TemplateContext and rendering a template to it (through the TemplateContext.Evaluate(template.Page) and you should be able output at your own pace and requirements.

This approach is working brilliantly: peak memory use while rendering those 30M values directly to a TextWriter is measured in the ones of MBs. Thank you for the direction!

authors: mapipolo xoofx

repo: lunet-io/scriban


text:
how to train on custom images?

The paper mentions Latent Consistency Fine-tuning on customised image datasets. Is there any available code to do that?
Also I noticed the results for pokemon and simpsons 30k finetuning is getting there but still kinda bad. Would this be fixed by using more than 30k iterations?

I also wonder how to read normal dataest format. e.g. 'json format'. How to realize it?

I also wonder how to read normal dataest format. e.g. 'json format'. How to realize it?

Just convert json format data to webdataset tar files will work.

Hello！Do you know any available code to do that? The paper mentioned Latent Consistency Fine-tuning. But I can't find the open sourced codes.

authors: dragon-cao habanerogossip howardgriffin quanh1990

repo: luosiallen/latent-consistency-model


text:
Use with adapter and viewholder

Hello,
How can i use setOnMenuItemClickListener when my listview use a adapter (extends BaseAdapter)?
My adapter have a ViewHolder with the ListItemView. When i inflate
The problem is get the number of the line of used menu, for example, i have item delete for all lines, want delete one, and i don't know the right way to do this.
Thanks for the project, it's amazing. And, sorry for my bad english.

Hey, this is not really a question for the library, but how to handle clicks in recyclerview adapter. Basically, you can create your own listener and pass it through. You will find a lot of examples on Stackoverflow eg https://stackoverflow.com/questions/24885223/why-doesnt-recyclerview-have-onitemclicklistener

authors: ludiaz lurbas

repo: lurbas/ListItemView


text:
More LEM API improvements

Several minor API improvements
New doc-strings
New helper gadgets for coprocessors authors, whose semantics are migrated from Alpha

!gpu-benchmark

repo: lurk-lab/lurk-rs


text:
hd5 support?

why not also hd5 format support for keras models?
why only h5?

Do you have any examples of hd5 files? Is it the same format with a different extension?

hd5, h5 and hdf5 are different extensions for the same format (Hierarchical Data).
here's an example.

authors: MehradAria lutzroeder

repo: lutzroeder/netron


text:
[update/rebase the UVC branch to latest] {update/rebase the UVC branch to latest?}

Start with the why:
UVC branch is not up to date and cannot use features like GPIO
Move to the what:
update/rebase the UVC branch to latest
Move to the how:
Update branch

cc @themarpe whether we have a plan to updaet the UVC branch (or perhaps merge it:)?

@awida1
Updated with state of latest develop

@themarpe Thank you for that. I ran the "install_requirements.py" and I am getting an error "'depthai.Pipeline' has no attribute 'createUVC'"

@awida1
That API is deprecated. Use pipeline.create(dai.node.UVC)

Thank you for the reply. I am getting: AttributeError: module 'depthai.node' has no attribute 'UVC'

Also what is included in the devlop branch that was updated? I assume GPIO. Anything else? I am trying to get a project working and some areas of UVC need support like video rotation. Are any of these included? Is there a place that I can see the updates?
Thanks!

You can check updates here: https://github.com/luxonis/depthai-core/releases
Nothing to relation to UVC was changes, just mainlined.
For that you might want to checkout ImageManip node, which could perform such operation

I changed the "uvc = pipeline.createUVC()" to "pipeline.create(dai.node.UVC)"
but I am getting the  "AttributeError: module 'depthai.node' has no attribute 'UVC'" error

@awida1 have you installed the latest depthai library from gen2_uvc branch?

I did an "install requirements" from the gen2_UVC branch. I assume it grabs the correct one? Is that the one youre talking about?

Maybe I am getting the syntax wrong. Is there a UVC example I can run.

repo: luxonis/depthai-core


text:
Two homography features

added calibration api along with rectified left and rectified right stream information to the documentation.

@saching13 I can see you're operating on an outdated branch (and some of the changes overlap, like available stream names). Could you rebase / merge with latest master?

@VanDavv Done.

Sorry this one was my fault I think.

authors: Luxonis-Brandon VanDavv saching13

repo: luxonis/depthai-docs-website


text:
🛑 BrandTag Blockchain API is down

In a4bc231, BrandTag Blockchain API (https://rest.brandtag.io/chain/height) was down:

HTTP code: 500
Response time: 782 ms

Resolved: BrandTag Blockchain API is back up in dd29096.

repo: luxtagofficial/upptime


text:
🛑 BrandTag API is down

In 2a32925, BrandTag API (https://api.brandtag.io) was down:

HTTP code: 502
Response time: 503 ms

Resolved: BrandTag API is back up in f8bb3b7.


text:
'.' is not recognized as an internal or external command, operable program or batch file

I am having trouble starting relay-full stack project. Plz Help
https://stackoverflow.com/questions/44970484/is-not-recognized-as-an-internal-or-external-command-for-relay-full-stack/44983742#44983742

Did you try with the latest version of Relay Fullstack? Because the problem should have been solve with https://github.com/lvarayut/relay-fullstack/pull/96

I'm going to close this issue since the issue has been solved with #96 . Please feel free to continue the discussion here if you had more question.

repo: lvarayut/relay-fullstack


text:
narwhalified BaseMappingTransformer

easy one
https://github.com/lvgig/tubular/issues/367

Assuming it's fine to just jump on this! Looks good to me, just one question but nothing blocking.

repo: lvgig/tubular


text:
Add Windows SDL2 build support

Demo now supports sdl2 in Linux & Macos. Windows user can build bare metal env, but can't built emulator env. Unfortunately, i don't use Windows and have no time to add this feature. But i can help with PIO scripting and CI tests if anyone wish to care about Win.
Suggested plan is:

Clone this repo for standalone experiments, to not care about other OS-es support.
Create repo with SDL2 dlls & headers, to be used as dependency lib.
Add created repo as library to platform.ini (don't worry about other OS-es at this step)
Try to build & add search paths to build options if needed
If works - kick me, to help with PR prepare.

I also prepared template for CI testing.

Hi @puzrin
I would like to help with this.
I am using:
Windows 10
VS Code
PIO
I cloned the git
$ git clone https://github.com/littlevgl/lv_platformio.git
Cloning into 'lv_platformio'...
remote: Enumerating objects: 70, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 233 (delta 26), reused 58 (delta 17), pack-reused 163
Receiving objects: 100% (233/233), 659.40 KiB | 2.38 MiB/s, done.
Resolving deltas: 100% (102/102), done.
Compile Error attached
error.log

You can just comment appropriate string in config.

Sorry, I don't know how to comment the appropriate string

Then i think it's better to wait until someone suggests working soluion. As i said in first post, i have no windows and no plans to spend time about it.

@timmcarson Adding a semicolon before !python should be enough.

@embeddedt Thanks,
I tried that and then I got a gcc error
error2.log

It seems that you don't have a compiler installed, or the wrong one is being chosen.

That was my understanding.   am I right in thinking that the example should install everything needed or do I need to manually install?
These are the extensions that I have installed currently

I'm not sure how PlatformIO works, but with other IDEs on Windows, you're typically given an option to download the IDE+compiler or download the compiler separately. Because PlatformIO is an addon to Visual Studio Code, I'm not sure that the same options are available. @puzrin probably knows more about this than I do.

Thanks everyone for the help.
I changed gears and tried for a simple example.  I have been able to successfully run the ESP32_TFT_eSPI.ino Arduino example on an ESP32 using platformIO on a windows machine.
This is good enough for me.
thanks again.

@embeddedt https://travis-ci.org/github/littlevgl/lv_platformio/builds/672323062 bare metal builds work on all OS-es. Questions about sdl2 win builds are not expected IMO.

To build emulator in Windows:
install MSYS2 : https://www.msys2.org/
install gcc : pacman -S mingw-w64-x86_64-gcc
install SDL2 : pacman -S mingw-w64-i686-SDL2
install VS Code : https://code.visualstudio.com/
install platformio : Extensions > search platformio
open lv_platformio folder
comment out the !python -c 'import platform; print("-m32" if platform.system() in [ "Linux" ] else "")' line in platformio.ini
build :)

@nickrodie That's great!
Can wee add this description to the README?

Sure.

@kisvegabor Should probably point out that those versions are quite specific. Namely minggw for 64bit Windows and SDL2. You might want to add that you can search for different vesrions in MSYS2 eg pacman -Ss SDL

I think having at least a working version for Windows is already great.
@puzrin ?

@kisvegabor
IMO this can be done more convenient:

Publish win sdl2 binaries in separate package
Add search path via -L flag.

In this case it will "just work". If anyone provides this kind of working example, i will help to do this compatible with anoter OS-es.

@nickrodie

comment out the !python -c 'import platform; print("-m32" if platform.system() in [ "Linux" ] else "")' line in platformio.ini

Why comment out needed? This line should add -m32 only for linux, and nothing for win.

@nickrodie

comment out the !python -c 'import platform; print("-m32" if platform.system() in [ "Linux" ] else "")' line in platformio.ini

Why comment out needed? This line should add -m32 only for linux, and nothing for win.

It fails for me. File "<string>", line 1     'import           ^ SyntaxError: EOL while scanning string literal OSError: 'python -c 'import platform; print("-m32" if platform.system() in [ "Linux" ] else "")'' exited 1:     File "C:\Users\Nick\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 168:     env.SConscript("$BUILD_SCRIPT")
I can't give you much more information about it because I don't understand the whole build system well enough. Python is installed.

Thanks for info. Try to swap " and '. Like here: https://github.com/speedcontrols/ac_sc_grinder/blob/master/platformio.ini#L83. That code works on all OS-es.

IIRC I did actually manage to build SDL2 from https://www.libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz but no matter what I tried I couldn't get lvgl to find all the files. I was following these instructions https://w3.cs.jmu.edu/bernstdh/Web/common/help/cpp_mingw-sdl-setup.php

Thanks for info. Try to swap " and '. Like here: https://github.com/speedcontrols/ac_sc_grinder/blob/master/platformio.ini#L83. That code works on all OS-es.

Yep that fixed it !python -c "import platform; print('-m32' if platform.system() in [ 'Linux' ] else '')"
`Environment      Status    Duration

native           SUCCESS   00:00:04.455
stm32f429_disco  IGNORED`

Great! Let's fight with SDL2 to make it work in 1 click :).
Try this in your fork:

Create folder /lib/lv_sdl2_win_bin, and put there binaries. This will emulate extern package.
Try to make it work, with -Llib/lv_sdl2_win_bin. If needed - change name in -lSDL2.

Tips:

Use verbose build, to check real generated options
If lib name is non conventional - read this and below https://community.platformio.org/t/failing-to-link-external-library/14544/2, about -l: alternative

I'm not familiar with win toolchains. Could you explain why you install mingw version of gcc? AFAIK pio should provide something built-in for native platform. No?

I don't think it will be as simple as 1 click for most.
gcc need to be installed for a start.
Here is output from a fresh clone into VS Code which already had platformio extension installed.
`> Executing task: C:\Users\Nick.platformio\penv\Scripts\platformio.exe run <
Processing native (platform: native)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
Dependency Graph
|--  6.1.1
|-- <lv_drivers> 6.1.1
|   |--  6.1.1
Building in release mode
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_debug.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_disp.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_group.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_indev.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_obj.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_refr.o
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_style.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw.o
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_arc.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_basic.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_img.o
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'gcc' is not recognized as an internal or external command,
Compiling .pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_label.o
operable program or batch file.
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_debug.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_disp.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_group.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_indev.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_obj.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_refr.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_core\lv_style.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_arc.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_basic.o] Error 1
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_img.o] Error 1
'gcc' is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\native\lib7e6\lvgl_ID6598\lv_draw\lv_draw_label.o] Error 1`
I will update as I get to SDL

...

I'm not familiar with win toolchains. Could you explain why you install mingw version of gcc? AFAIK pio should provide something built-in for native platform. No?
I don't know enough to answer that.

Also forgot to add in my original instructions that I had to add the msys64\mingw64\bin dir to path in windows.
What I can tell you is that as far as a Windows user experience goes the MSYS2 method is very simple. Just a few simple clicks and it's all done for you.

Hm... if user has to install gcc, then your choice of MSYS2 is reasonable, and it's not a problem to install stl2 from the same source. Then we can use your recipe as is. Not 1-click, but useable and simple enouth.

I don't know why but Travis docs suggest choco to install python https://github.com/puzrin/reflow_micro/blob/master/.travis.yml#L52. Is it built-in of Windows? Can it be used to simplify install of MSYS2 https://chocolatey.org/search?q=gcc?
PS. I don't understand anything in this for win, only copy-pasted recipe.

I think python is autpmatically installed as part of the platformio extension in vs code

Also as far as installing gcc goes the msys method is also the easiest I tried. I did originally use mingw from http://www.mingw.org/wiki/Getting_Started but it took me a couple of goes to get all the right packages so that i could build SDL

@kisvegabor @puzrin FYI I had a typo in original post and wrong SDL2 installation. I have amended the instructions.

add path to mingw64\bin dir. typically C:\msys64\mingw64\bin

This is not convenient (need to think instead of copy-paste commands). Is there any way to autodetect location or add it to path automatically?
Did you tried -LC:\msys64\mingw64\bin instead?

I don't think you'll have any luck making it any easier than what I've already indicated. Even MS talk about manually editing the path https://code.visualstudio.com/docs/cpp/config-mingw

To make it easier I think you'd have to find an installer that has an "Add to PATH" option built in.

However the path can be taken from the install if you use msys2 install dir + /mingw64/bin

don't think you'll have any luck making it any easier than what I've already indicated. Even MS talk about manually editing the path code.visualstudio.com/docs/cpp/config-mingw

Sorry, i misread your post. I thought it's about path to sdl2. Then link to https://code.visualstudio.com/docs/cpp/config-mingw#_prerequisites should be ok.
PS. Last time i used windows, when path was added via editing autorun.bat file :)

I mean you can add it with setx /M PATH %PATH%;[install_dir]" but this can fail under certain circumstances (like path too long) so it's not reliable.

This will be useful for Travis-CI anyway, i need add build test.

Fixed win compatibility https://github.com/lvgl/lv_platformio/commit/38dd9ce985088338157510c8eb13c8fbe2661497
Added native win build check to CI https://github.com/lvgl/lv_platformio/commit/04a2f24f2def168c03efd4e287a5a915489da68e.

@nickrodie Do you wish make PR to reflect your help in commits history?

No. But thanks for the offer.

https://github.com/lvgl/lv_platformio/commit/39cb13e2da4f5711465efebb318d13fb95737297
Please, check. Any fixes needed?

Close as complete. Big thanks to @nickrodie for help!

authors: embeddedt kisvegabor nickrodie puzrin timmcarson


text:
New activities

CropImageCompatActivity is AppCompatActivity extended.
You can extend CropImageBase(Compat)Activity as a Customizable layout.
Bump Android Studio 2.0 Beta.

I'm currently on a business trip. I'll probably be able to review it this weekend.
Sent from my iPhone

On 08 Feb 2016, at 01:23, Hikaru Wada notifications@github.com wrote:
CropImageCompatActivity is AppCompatActivity extended.
You can extend CropImageBase(Compat)Activity as a Customizable layout.
Bump Android Studio 2.0 Beta.
You can view, comment on, or merge this pull request online at:
https://github.com/lvillani/android-cropimage/pull/59
Commit Summary
Bump gradle version 2.10
Bump gradle plugin version 2.0.0-beta2
Delete NoSearchActivity(won't use)
Refactoring AndriodManifest
Just more simple writing
Delete CropImageRepo
Refactoring CropImage
Update compileSdkVersion targetSdkVersion 22
Rename CropImage -> CropImageActivity
Add AppCompatActivity extended Activity
Add customizable layout sample
File Changes
M CropImage/build.gradle (6)
M CropImage/src/main/AndroidManifest.xml (14)
A CropImage/src/main/java/com/android/camera/CropImageActivity.java (37)
R CropImage/src/main/java/com/android/camera/CropImageBaseActivity.java (397)
A CropImage/src/main/java/com/android/camera/CropImageBaseCompatActivity.java (601)
A CropImage/src/main/java/com/android/camera/CropImageCompatActivity.java (29)
M CropImage/src/main/java/com/android/camera/CropImageIntentBuilder.java (87)
A CropImage/src/main/java/com/android/camera/CropImageView.java (266)
M CropImage/src/main/java/com/android/camera/HighlightView.java (4)
A CropImage/src/main/java/com/android/camera/MonitorInterface.java (44)
M CropImage/src/main/java/com/android/camera/MonitoredActivity.java (25)
A CropImage/src/main/java/com/android/camera/MonitoredCompatActivity.java     (71)
D CropImage/src/main/java/com/android/camera/NoSearchActivity.java (26)
M CropImage/src/main/java/com/android/camera/Util.java (55)
M CropImageExample/build.gradle (2)
M CropImageExample/src/main/AndroidManifest.xml (32)
A CropImageExample/src/main/java/com/android/camera/example/CropImageCustomizeActivity.java (31)
M CropImageExample/src/main/java/com/android/camera/example/MainActivity.java (5)
A CropImageExample/src/main/java/com/android/camera/example/MainCompatActivity.java (73)
A CropImageExample/src/main/java/com/android/camera/example/MainCustomizeActivity.java (72)
A CropImageExample/src/main/java/com/android/camera/example/MenuActivity.java (36)
A CropImageExample/src/main/res/layout/activity_crop_image_customize.xml (43)
A CropImageExample/src/main/res/layout/activity_menu.xml (33)
D CropImageRepo/.gitignore (6)
D CropImageRepo/app/.gitignore (1)
D CropImageRepo/app/build.gradle (36)
D CropImageRepo/app/proguard-rules.pro (17)
D CropImageRepo/app/src/androidTest/java/me/villani/lorenzo/cropimagerepo/ApplicationTest.java (13)
D CropImageRepo/app/src/main/AndroidManifest.xml (22)
D CropImageRepo/app/src/main/java/me/villani/lorenzo/cropimagerepo/MainActivity.java (39)
D CropImageRepo/app/src/main/res/layout/activity_main.xml (14)
D CropImageRepo/app/src/main/res/menu/menu_main.xml (7)
D CropImageRepo/app/src/main/res/mipmap-hdpi/ic_launcher.png (0)
D CropImageRepo/app/src/main/res/mipmap-mdpi/ic_launcher.png (0)
D CropImageRepo/app/src/main/res/mipmap-xhdpi/ic_launcher.png (0)
D CropImageRepo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (0)
D CropImageRepo/app/src/main/res/values-w820dp/dimens.xml (6)
D CropImageRepo/app/src/main/res/values/dimens.xml (5)
D CropImageRepo/app/src/main/res/values/strings.xml (7)
D CropImageRepo/app/src/main/res/values/styles.xml (8)
D CropImageRepo/build.gradle (19)
D CropImageRepo/gradle.properties (18)
D CropImageRepo/gradle/wrapper/gradle-wrapper.jar (0)
D CropImageRepo/gradle/wrapper/gradle-wrapper.properties (6)
D CropImageRepo/gradlew (164)
D CropImageRepo/gradlew.bat (90)
D CropImageRepo/settings.gradle (1)
M build.gradle (4)
M gradle/wrapper/gradle-wrapper.properties (2)
Patch Links:
https://github.com/lvillani/android-cropimage/pull/59.patch
https://github.com/lvillani/android-cropimage/pull/59.diff
—
Reply to this email directly or view it on GitHub.

I'm afraid I can't accept this pull request as-is: it assumes that developers are using a beta version of Android Studio and makes some heavy-handed changes to the upstream codebase (see also CONTRIBUTING.md). Some commits (such as 537a744) can be merged, though, provided they are submitted as separate pull requests that I can review individually.

authors: lvillani sugoi-wada

repo: lvillani/android-cropimage