text:
Introduce Minimax, AlphaBeta Pruning and Negamax Algorithm

Minimax Algorithm

const chess = new Chess()
const search = chess.minimax(5)
console.log("bestscore:", search[0], "bestsmove: ", search[1], "nodes: ", search[2])

AlphaBeta Pruning Algorithm

const chess = new Chess()
const search = chess.alphabeta(5, -Infinity, Infinity)
console.log("bestscore:", search[0], "bestsmove: ", search[1], "nodes: ", search[2])

Negamax with alpha beta pruning

const chess = new Chess()
const search = chess.negamax(5, -Infinity, Infinity)
console.log("bestscore:", search[0], "bestsmove: ", search[1], "nodes: ", search[2])

@jhlywa, I think the educational aspect of this PR is as important as basic search capability.

A couple of thoughts:

Search in JavaScript will be slow ... very very slow. People are used to WASM versions of Stockfish hitting depth 28 in seconds on lichess.  Search in vanilla JS will be lucky to hit depth 3 in a few seconds. I'm fine with this. People can use it to solve mate-in-2's or play a 1600 ELO engine.
The function should probably have a signature like: chess.search({maxDepth: 5, maxTime: 5.0}) or something similar.
A time-based search will need to use iterative deepening to find the best move at shallower depths first.
We need a piece/square scoring matrix. Right now the engine would probably end up playing something like 1. Nf3 ... 2. Rg1 ... 3. Rh1 ... 4. Rg1 .... Maybe one for king safety and one for all the other pieces? I'd like to avoid bloating the codebase by have one for each piece type.
Move ordering is critical for maximizing cut-offs in alphabeta, so we'll need to investigate. Most Valuable Victim  - Least Valuable Attacker (MVV/LVA) is common approach.
The search doesn't handle mate or stalemates.
We'll need a qsearch to keep it from making terrible capture sequences that are beyond the search horizon.
You can simplify and combine the logic for white and black by negating and swapping the window values during the recursive call to alphabeta (e.g. -alphabeta(depth - 1, -beta, -alpha)). There are some examples of this online.

@jhlywa I am making progress, but it's going to take quite a long time.

We need a piece/square scoring matrix. Right now the engine would probably end up playing something like 1. Nf3 ... 2. Rg1 ... 3. Rh1 ... 4. Rg1 ....

var pawn =
    [100, 100, 100, 100, 105, 100, 100, 100,
    78, 83, 86, 73, 102, 82, 85, 90,
    7, 29, 21, 44, 40, 31, 44, 7,
    -17, 16, -2, 15, 14, 0, 15, -13,
    -26, 3, 10, 9, 6, 1, 0, -23,
    -22, 9, 5, -11, -10, -2, 3, -19,
    -31, 8, -7, -37, -36, -14, 3, -31,
    0, 0, 0, 0, 0, 0, 0, 0,
    ];

var knight =
   [ -66, -53, -75, -75, -10, -55, -58, -70,
    -3, -6, 100, -36, 4, 62, -4, -14,
    10, 67, 1, 74, 73, 27, 62, -2,
    24, 24, 45, 37, 33, 41, 25, 17,
    -1, 5, 31, 21, 22, 35, 2, 0,
    -18, 10, 13, 22, 18, 15, 11, -14,
    -23, -15, 2, 0, 2, 0, -23, -20,
    -74, -23, -26, -24, -19, -35, -22, -69,
  ];

var bishop =
    [-66, -53, -75, -75, -10, -55, -58, -70,
    -3, -6, 100, -36, 4, 62, -4, -14,
    10, 67, 1, 74, 73, 27, 62, -2,
    24, 24, 45, 37, 33, 41, 25, 17,
    -1, 5, 31, 21, 22, 35, 2, 0,
    -18, 10, 13, 22, 18, 15, 11, -14,
    -23, -15, 2, 0, 2, 0, -23, -20,
    -74, -23, -26, -24, -19, -35, -22, -69,
 ] ;

var rook =
   [ 35, 29, 33, 4, 37, 33, 56, 50,
    55, 29, 56, 67, 55, 62, 34, 60,
    19, 35, 28, 33, 45, 27, 25, 15,
    0, 5, 16, 13, 18, -4, -9, -6,
    -28, -35, -16, -21, -13, -29, -46, -30,
    -42, -28, -42, -25, -25, -35, -26, -46,
    -53, -38, -31, -26, -29, -43, -44, -53,
    -30, -24, -18, 5, -2, -18, -31, -32,
  ];

var queen =
   [35, 29, 33, 4, 37, 33, 56, 50,
    55, 29, 56, 67, 55, 62, 34, 60,
    19, 35, 28, 33, 45, 27, 25, 15,
    0, 5, 16, 13, 18, -4, -9, -6,
    -28, -35, -16, -21, -13, -29, -46, -30,
    -42, -28, -42, -25, -25, -35, -26, -46,
    -53, -38, -31, -26, -29, -43, -44, -53,
    -30, -24, -18, 5, -2, -18, -31, -32,
  ];

var king =
    [4, 54, 47, -99, -99, 60, 83, -62,
    -32, 10, 55, 56, 56, 55, 10, 3,
    -62, 12, -57, 44, -67, 28, 37, -31,
    -55, 50, 11, -4, -19, 13, 0, -49,
    -55, -43, -52, -28, -51, -47, -8, -50,
    -47, -42, -43, -79, -64, -32, -29, -32,
    -4, 3, -14, -50, -57, -18, 13, 4,
    17, 30, -3, -14, 6, -1, 40, 18,
  ];

The search doesn't handle mate or stalemates.

  if (chess.in_checkmate()) {
   return (color === WHITE) ?  Infinity : -Infinity;
  }

  if (chess.in_draw() || chess.in_threefold_repetition() || chess.in_stalemate()) {
    return 0;
  }

You can simplify and combine the logic for white and black by negating and swapping the window values during the recursive call to alphabeta (e.g. -alphabeta(depth - 1, -beta, -alpha)). There are some examples of this online.

[ ] Negamax with alpha beta pruning

@jhlywa, The question is: is this enough?


text:
imposible to start jam.py

imposible to start jam.py
here is the result
python3 jam.py                             <main ✗>
/home/cpi/Documents/CleverJAM/jam.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import StrictVersion
Traceback (most recent call last):
File "/home/cpi/Documents/CleverJAM/jam.py", line 274, in
main()
File "/home/cpi/Documents/CleverJAM/jam.py", line 252, in main
tb = top_block_cls()
File "/home/cpi/Documents/CleverJAM/jam.py", line 41, in init
gr.top_block.init(self, "Jammer Gen")
File "/usr/local/lib/python3.10/dist-packages/gnuradio/gr/top_block.py", line 96, in init
hier_block2.init(self, name, None, None, top_block_pb(name, catch_exceptions))
ValueError: pmt_dcons: not a dict: wrong_type #
double free or corruption (!prev)
[1]    143204 abort      python3 jam.py
no idea on how to solve .Thanks for help

It’s included in and working in DragonOS. I did a video about it awhile back. Not sure what setup you’re running, but maybe do a comparison.

I'm able to run under dragon os. I tried to install on clock pi computer. I
have to reinstall all gnaradio libraries for this laptop. This clock pi
based on arm can't run dragon os raspi. I have maybe some python 3 not
working
Le sam. 6 avr. 2024 à 17:16, alphafox02 @.***> a écrit :

It’s included in and working in DragonOS. I did a video about it awhile
back. Not sure what setup you’re running, but maybe do a comparison.
—
Reply to this email directly, view it on GitHub
https://github.com/jhonnybonny/CleverJAM/issues/3#issuecomment-2041115847,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIANDV3GJV6V4J4RUK6B6U3Y4AGTZAVCNFSM6AAAAABFHIXBFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGEYTKOBUG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

source: gharchive/issue

repo: jhonnybonny/CleverJAM

license: MIT

license_type: permissive

license_source: github-api


text:
apsnet name resolving : resolve suspicious name mappings

samara's scraper of apsnet makes an attempt to extract names of crops and diseases. However, because apsnet pages are far from homogeneous and because the apsnet scraper is not perfect, some of the extracted names are not taxon descriptors. In addition, other names are taxon names that cannot be resolved through various name resolvers. Because samara's view on apsnet is included in GloBI (http://globalbioticinteractions.org) , I was able to see that a bunch of names needed some attention using the GloBI status page (see attached image and name report).
Looking into ways to map these names without spending too much time on it. Happy to hear your thoughts @austinmeier @cmungall .

apsnet-suspicious-names.tsv.txt

I wish I had a good answer for you.  The only way I can think to resolve those names is by hand, and that will definitely take some serious time.
Is there a way to send out a little report that includes all the crops/diseases that have been successfully mapped, and a list of those that are unsuccessful?  (is that what apsnet-suspicious-names.tsv.txt is?)  I think it would be nice to inform APS of our struggles, and see if they have any intention of standardizing their internal lists of diseases.

sounds like a good start

Very much like the idea to work together with APS in addition to having a way to work with the status quo.
I'll work on creating some name reports specific to APS and spent some time on how folks other than myself can apply corrections.  I was thinking of reusing a bit of the https://github.com/jhpoelen/eol-globi-data/wiki/Taxonomy-Matching approach and make it specific for APS.
In an ideal word, we'd work with the APS folks to make their pages machine readable, and sharing the name reports would be nice first step towards that. More later ...

@austinmeier I finally got around to doing a little more work on the aps name matching:

added README related to apsnet name/taxon mapping:  https://github.com/jhpoelen/samara/tree/master/src/main/resources/org/planteome/samara/apsnet
I've added some obvious "no:name" mappings for author names and other parsing artifacts that are note taxon names, like environmental conditions (see https://github.com/jhpoelen/samara/blob/master/src/main/resources/org/planteome/samara/apsnet/nameMap.tsv#L56).
I've added some obvious name parsing entries, but there are plenty that are troublesome and need some manual intervention.
attached, you'll find a selection of names that GloBI found some likely candidates for (see apsunmatched.tsv.txt
). These entries might indicate typos in apsnet. I was hoping you could review and add the corrected entries to https://github.com/jhpoelen/samara/blob/master/src/main/resources/org/planteome/samara/apsnet/taxonMap.tsv to avoid having a non-specialist like myself make funky mapping mistakes. In the attached file you'll also find a reference to the original page that the name was found in.

Please holler if you need some more information to help with the name matching. Happy to spend 30 min on figuring out how to move forward on this and perhaps consider other methods to clean
up the apsnet names / data a bit.
Please note that all of this name mapping business is repeatable and automated, so we can easily undo mistakes or apply new fixes.

Excellent.  I would be happy to attempt manual mapping of those suspicious mappings.  I don't claim to be an expert in ALL of plant diseases, so I can ask friends and colleagues for input as needed.  Stay tuned!

@austinmeier hey austin - was wondering about the state of names. Would it help making it easier to correct names with a webtool of sorts?

Hey @jhpoelen, I finally got around to looking at this to see if it contained some of the issues we discussed yesterday.  Can you tell me which column you were attempting to map with the above (unmatched.tsv.txt)  HOST, or PATHOGEN?  knowing this would make it much easier to determine what the correct match should be.
Also, what are the headers of that file?  It looks like column D is the cleaned up version of the "verbatim name"?

hey @austinmeier - the apsunmatched.tsv.txt contains both host and pathogen names that could not be matched using GloBI's taxon resolver. Column D is a name suggested via fuzzy name matching provided by resolver.globalnames.org .
If you need more info, lets chat in person, might be faster.

authors: austinmeier cmungall jhpoelen

repo: jhpoelen/samara

license: mit

license_source: bigquery


text:
🔄 Synced file(s) with jhudsl/OTTR_Template

Synced local file(s) with jhudsl/OTTR_Template.

Changed files

Synced local directory .github/workflows/ with remote directory .github/workflows/Synced local directory style-sets with remote directory style-sets

This PR was created automatically by the repo-file-sync-action workflow run #4304532444

Please carefully review these changes and decide which are useful for your course.
See the release notes: https://github.com/jhudsl/OTTR_Template/releases

If you don't want the changes from a particular file, you can always revert that particular commit before merging the sync PR.
If you will not want any updates on this file in the future, you may want to remove a file from being synced in your repo by reconfiguring the sync file.

If you want only some changes, but they are not on a whole file basis, you could check out the branch and make manual edits. To checkout the branch, navigate to your own repository you should be able to run:

git checkout repo-sync/OTTR_Template/default

If you don't want any of the changes you can close the PR entirely.

You may want to unenroll your repository from the sync GitHub actions by filing a PR on OTTR_Template
to delete your repo name from this file if this will continue to be the case.

source: gharchive/pull-request


text:
Ava/suggestions to reorg

Suggestions to PR by @ehumph
If these look good to you, feel free to approve and merge!
Note that I used the new css callout boxes (notice, warning).. so that might cause some render issues.

It looks so much better! (Also, bless you for finding the spelling error.)

authors: avahoffman ehumph


text:
Alternative text for update-enrollment.md

This builds off @KatherineCox 's work but takes the following approach:

OTTR will push updates to AnVIL_Template
AnVIL_Template will push updates to all downstream repos.

This means we need to remove the following from OTTR_Template/.github/sync.yml:

[ ] jhudsl/AnVIL_Book_Getting_Started
[ ] jhudsl/AnVIL_Book_Instructor_Guide
[ ] jhudsl/AnVIL_Book_WDL
[ ] jhudsl/GDSCN_Book_SARS_Galaxy_on_AnVIL

And add the following to AnVIL_Template/.github/sync.yml

[ ] AnVIL_Book_WDL
[ ] AnVIL_Book_Getting_Started
[ ] phylogenetic-techniques
[ ] GDSCN_Book_Statistics_for_Genomics_Differential_Expression
[ ] GDSCN_Book_SARS_Galaxy_on_AnVIL
[ ] GDSCN_Book_Statistics_for_Genomics_scRNA-seq
[ ] GDSCN_Book_Statistics_for_Genomics_RNA-seq
[ ] GDSCN_Book_Statistics_for_Genomics_PCA
[ ] AnVIL_Book_Instructor_Guide
[ ] fhdsl/AnVIL_Book_Epigenetics_Intro

good idea! #133


text:
Missing elements, probably caused by Pseudo Elements

https://stackoverflow.com/questions/46003050/cant-get-entire-html-with-jsoup
i am trying to get recent 5 stories in wired.com but i have a problem. As you can see in the link i can't get some of components, actually only the image that i can't get. I got suspect from ::before pseudo but i couldnt find any solution for this. What can i do about that??

Hello, @fdotergun
You try to read DOM-elements, which will be rendering after document ready with React scripts.
https://stackoverflow.com/questions/46003050/cant-get-entire-html-with-jsoup#comment79004431_46003050
JSoup can not run JS-scripts. If you use Google Chrome, you can press Ctrl+U on wired.com page and in new browser tab you can see how to looks page before JS-script execution.
You should find page, which contains all necessary HTML-element and which does not require JS-scripts.

repo: jhy/jsoup


text:
dynamic url port

I'm using nativefiyer to create the front end for a desktop app which is run from a local server. I'd like the port its served on to be randomly determined with I start it, how can I pass that to electron so that it can point to the correct url?
My server is running off of python quart, not that it would make much difference, but I start the server and then start electron. closing electron signals that I can kill the server
thanks

would love to see an official option for this, but at the moment I am creating the app using localhost and then using sed to replace options.targetUrl with "http://localhost:"+porcess.env.port.  obviously I am setting the environment variable before starting app. Works on linux (arch specifically) going to see how it works on windows

would love to see an official option for this, but at the moment I am creating the app using localhost and then using sed to replace options.targetUrl with "http://localhost:"+porcess.env.port. obviously I am setting the environment variable before starting app

@jjgalvez 👍, this seems totally reasonable, as your server has knowledge of A. the port, and B. where the option file lives, so your server is the right place to do what you want, not Nativefier.
I don't see how a new Nativefier option would work, and it's so niche I think I'd rather not have the feature in. With that, closing.

Fare enough, thanks for keeping nativefier working, its a great app,

authors: jjgalvez ronjouch

repo: jiahaog/nativefier


text:
Performance on lsp dataset

did you evaluate your network on the lsp dataset? if yes can you kindly share how many epochs for pre-training and training or other parameters?

Not yet. I haven't found an optimal set of hyper-parameter for pre-training or training.
If you have evaluated a good result, would you please share your configurations of training?

Not yet. I haven't found an optimal set of hyper-parameter for pre-training or training.
If you have evaluated a good result, would you please share your configurations of training?

I recently tested your model, with an 80:20 train:val spilt. Got an average PCKh of 63%. Though the model performance on webcamera was not even close. It seemed to suffer from resolution issue, I tried loading a video with 255*255, but the model could not take in the keypoint correctly

authors: jiang-du jsm2312 maltius

repo: jiang-du/BlazePose-tensorflow


text:
Merge build-to-app into master

Why are these changes needed?

Related issue number

Checks

[ ] I've run scripts/format.sh to lint the changes in this PR.
[ ] I've included any doc changes needed for https://docs.ray.io/en/master/.
[ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
Testing Strategy

[ ] Unit tests
[ ] Release tests
[ ] This PR is not tested :(

Current dependencies on/for this PR:

master

PR #53   (this PR)

This comment was auto-generated by Graphite.

repo: jiaodong/ray


text:
Write docs for configuring these converters

Description
Continuation of #17, but depending on #16 that wont be in the first release.
Motivation
Need the documentation for users to start using this package.
Suggested solution
Needs documentation in wiki:

How to configure via the ScriptableObject described in #16

Closing as duplicate of #41


text:
Exception: java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())

Description
Stacktrace
Please paste the full stacktrace from the IDEA error popup.
java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:980)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:354)
	at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:154)
	at com.intellij.lang.jsgraphql.GraphQLFileType.isGraphQLScratchFile(GraphQLFileType.java:64)
	at com.intellij.lang.jsgraphql.GraphQLFileType.isGraphQLFile(GraphQLFileType.java:80)
	at com.intellij.lang.jsgraphql.ide.project.GraphQLUIProjectService.lambda$reloadEndpoints$1(GraphQLUIProjectService.java:174)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at com.intellij.lang.jsgraphql.ide.project.GraphQLUIProjectService.lambda$reloadEndpoints$5(GraphQLUIProjectService.java:175)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:240)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:385)
	at com.intellij.util.Alarm$Request.run(Alarm.java:374)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)

Version and Environment Details
Operation system: Linux 5.8.0-63-generic
IDE version: PS-213.5744.279
Plugin version: 3.1.0

Fixed in 3.1.2.

authors: dennis-koster vepanimas


text:
🛑 SLAS is down

In b58225e, SLAS ($SECRET_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SLAS is back up in 57b4076 after 20 minutes.

repo: jimmymjin/uptime


text:
Future binary?

Hi,
I have written an ios app using OSMD. It uses a WKWebview but all files are loaded locally. I would love to incorporate your audio player. I have just started to experiment with it. I can run the basic demo locally but am trying to figure out how I am going to add this to my XCode project.
Do you think it may be possible for you to provide a master binary in your future releases? I don't know Javascript well so am not sure if this is practical. But with OSMD, I just add the binary opensheetmusicdisplay.min.js to the project and I can easily reference everything using that and get it all to work. With the audio player, importing and connecting all of the various parts of the project (../../dist/PlaybackEngine, etc.) make it relatively complicated and impractical for an app development situation.
Please let me know if the binary idea makes sense and is a possibility. I would appreciate any advice otherwise.
Thank you!
Matt

Interesting question. Not that I have good answer ( nor am I maintainer ) but doing something similar from a bit different perspective - mainly to learn iOS dev (from JS background) and overcome some Web limitations ( such as iOS midi I/O and use more robust audio frameworks ).
What I am currently working on is to receive a midi message from OSMD web view to native and handle audio playback using AudioKit. It's robust and doesn't have usual single threaded web audio problems.
Curious how you are handling passing XML files between native context and web view.

Hi, sorry for the delay! You have to correct me if I'm wrong @matty90278, but if I understand you correctly your mainly after a single bundled distribution of the audio player that can be used in the same style as the opensheetmusicdisplay.min.js you mentioned? You're not looking to integrate it with native code in the iOS app?
In case you're just after a bundled distribution in the same fashion as OSMD is offering it's absolutely something I can fix, and that I've also planned. The current build exports modern Javascript using ES modules. But I do also plan to fix a more standard old-fashioned build to be easily referenced in an web page, also with better support for slightly older browsers.
I've got a similar request by email previously, so I'll look into doing this rather soon.

@matty90278 There is now a minified UMD build available. See the updated README. It can be downloaded through JSDelivr at: https://cdn.jsdelivr.net/npm/osmd-audio-player/umd/OsmdAudioPlayer.min.js

@matty90278 There is now a minified UMD build available. See the updated README. It can be downloaded through JSDelivr at: https://cdn.jsdelivr.net/npm/osmd-audio-player/umd/OsmdAudioPlayer.min.js

Hi,
Yes, that is exactly what I was asking for. Thank you!! I got it running in my iOS app. I haven’t tested thoroughly yet and there are some error messages (I think they are Apple bugs) but I think this approach will work for me.
I’ll have to look through your files more but do you have any simple guides to turning on/off settings yet? For instance, is there a feature to have a cursor track through the music as it is played?
I look forward to the future updates. Thanks again for the quick response!

authors: ilionic jimutt matty90278

repo: jimutt/osmd-audio-player


text:
fix: min ranker ranks by minimum

The min ranker was not really a min ranker previously.
We did sort the elements of the array descendingly, this means the maximum score is in the first place.
This PR fixes this bug and repairs the Minranker to rank by minimum score (minimum distance).

Thanks for pointing it out. 😄

Thanks for pointing it out. smile

The name of this executor is minranker - if we also allow mean and max ranking, we should probably rename it right?

if we also allow mean and max ranking, we should probably rename it right?

Yes, maybe SimpleRanker?

authors: Yongxuanzhang jakob1111996 nan-wang

repo: jina-ai/executors


text:
Wrong documentation for Has One Association

In documentation for has one association  here is wrote:
// User has one CreditCard, CreditCardID is the foreign key
type User struct {
  gorm.Model
  CreditCard   CreditCard
  CreditCardID uint
}

type CreditCard struct {
  gorm.Model
  Number   string
}

but must be:
// User has one CreditCard, CreditCardID is the foreign key
type User struct {
  gorm.Model
  CreditCard   CreditCard
}

type CreditCard struct {
  gorm.Model
  Number   string
  UserID   uint
}

If it's a Has one relationship then CreditCard must have a foreign key to UserID but in documentation User has a foreign key to CreditCardID which in this case makes a Belong to relationship which is wrong.

I also found wrong documentation in many2many, where I can contribute to fixing it?

Fixed in https://github.com/jinzhu/gorm.io/pull/119

authors: emirb riwogo rubiagatra

repo: jinzhu/gorm


text:
about the created_at time zone

When created new record, the created_at insert value is 2014-09-30 00:58:27, and my computer local time is 2014-09-30 08:58:27, the time zone should be +8
Is there a method can set the time zone, like gorm.SetTimeZone("Shanghai"), or gorm.SetTimeZone(+8)?

the same question!!
I think the golang time package is the most difficult package to use ....

you miss "&loc=Local" parameter when connect database. And it causes my above problem.

@vutung7193 I believe not every database adapters have this option. At least not for Postgres

authors: phluan superwf vutung7193 xiaoshengaimm


text:
invalid memory address or nil pointer dereference

type Artical struct {
	Id            int    `json:"id" gorm:"column:id:primary_key"`
	Title         string `json:"title" gorm:"column:title"`
	Content       string `json:"content"  gorm:"column:content"`
	CollectId     int `json:"collect_id"  gorm:"column:collect_id"`
}

func (m *Models) GetAllArticals(id int) (isSucc bool, articals []Artical) {
	err := db.DefaultDB.
		Table("articals").
		Find(&articals). // error line...
		Error

	fmt.Println(err.Error())
	if err != nil {
		return false, nil
	}
	return
}

Handler crashed with error runtime error: invalid memory address or nil pointer dereference
i just test find result with mysql,but show runtime error

Same issue.

Trace:

goroutine 67 [running]:
github.com/jinzhu/gorm.(*Scope).callCallbacks.func1(0xc000274100)
        /home/krupal/go/go1.12.5/pkg/mod/github.com/jinzhu/gorm@v1.9.10/scope.go:884 +0xb0
panic(0xc16360, 0x148dff0)
        /usr/local/go/src/runtime/panic.go:522 +0x1b5
database/sql.(*DB).conn(0x0, 0xec2120, 0xc0000ba010, 0x101, 0xd00ed6, 0x3, 0xffffffffffffffff)
        /usr/local/go/src/database/sql/sql.go:1080 +0x3a
database/sql.(*DB).query(0x0, 0xec2120, 0xc0000ba010, 0xc0000442c0, 0x158, 0xc000399180, 0x2, 0x2, 0x1, 0x39a2f4bd676e0333, ...)
        /usr/local/go/src/database/sql/sql.go:1513 +0x66
database/sql.(*DB).QueryContext(0x0, 0xec2120, 0xc0000ba010, 0xc0000442c0, 0x158, 0xc000399180, 0x2, 0x2, 0x0, 0xbc2c80, ...)
        /usr/local/go/src/database/sql/sql.go:1495 +0xd1
database/sql.(*DB).Query(0x0, 0xc0000442c0, 0x158, 0xc000399180, 0x2, 0x2, 0x203000, 0x7f211d04d960, 0x0)
        /usr/local/go/src/database/sql/sql.go:1509 +0x83
github.com/jinzhu/gorm.queryCallback(0xc000274100)
        /home/krupal/go/go1.12.5/pkg/mod/github.com/jinzhu/gorm@v1.9.10/callback_query.go:67 +0x3b2
github.com/jinzhu/gorm.(*Scope).callCallbacks(0xc000274100, 0xc000276ec0, 0x3, 0x4, 0x0)
        /home/krupal/go/go1.12.5/pkg/mod/github.com/jinzhu/gorm@v1.9.10/scope.go:888 +0x88
github.com/jinzhu/gorm.(*DB).Take(0xc000153ee0, 0xb9b7a0, 0xc000398e40, 0x0, 0x0, 0x0, 0xc000153ee0)
        /home/krupal/go/go1.12.5/pkg/mod/github.com/jinzhu/gorm@v1.9.10/main.go:338 +0xc6
github.com/x/api/v1/scanner/rpc.getSubscriptionRequestsFromDb(0xc00038c000, 0xc000454328, 0x2, 0x1, 0xc0000c03c0, 0xc0003299d8)
        /home/krupal/GoWorkspace/proj/github.com/x/api/v1/scanner/rpc/controller.go:250 +0x525
github.com/x/api/v1/scanner/rpc.(*server).Scan(0xc00000f120, 0xc00045a1e0, 0xec7660, 0xc0004731d0, 0xc00000f120, 0xd0)
        /home/krupal/GoWorkspace/proj/github.com/x/api/v1/scanner/rpc/service.go:114 +0xfd5
github.com//api/v1/scanner/rpc._ScanRpc_Scan_Handler(0xc41ca0, 0xc00000f120, 0xec64c0, 0xc00049c000, 0xc0003b9ca8, 0x1)
        /home/krupal/GoWorkspace/proj/github.com/x/api/v1/scanner/rpc/scan_rpc.pb.go:1092 +0x109
github.com/x/api/v1/auth.StreamInterceptor(0xc41ca0, 0xc00000f120, 0xec64c0, 0xc00049c000, 0xc00048c140, 0xd33ba0, 0xec21a0, 0xc000450270)
        /home/krupal/GoWorkspace/proj/github.com/x/api/v1/auth/interceptor.go:103 +0x246
google.golang.org/grpc.(*Server).processStreamingRPC(0xc0003b6420, 0xeca3c0, 0xc000306600, 0xc00048e000, 0xc000382660, 0x1494d80, 0x0, 0x0, 0x0)
        /home/krupal/go/go1.12.5/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:1206 +0x462
google.golang.org/grpc.(*Server).handleStream(0xc0003b6420, 0xeca3c0, 0xc000306600, 0xc00048e000, 0x0)
        /home/krupal/go/go1.12.5/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:1279 +0xd3f
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0002d71c0, 0xc0003b6420, 0xeca3c0, 0xc000306600, 0xc00048e000)
        /home/krupal/go/go1.12.5/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:710 +0x9f
created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/krupal/go/go1.12.5/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:708 +0xa1

type Artical struct {
	Id            int    `json:"id" gorm:"column:id:primary_key"`
	Title         string `json:"title" gorm:"column:title"`
	Content       string `json:"content"  gorm:"column:content"`
	CollectId     int `json:"collect_id"  gorm:"column:collect_id"`
}

func (m *Models) GetAllArticals(id int) (isSucc bool, articals []*Artical) {
	err := db.DefaultDB.
		Table("articals").
		Find(&articals). // error line...
		Error

	fmt.Println(err.Error())
	if err != nil {
		return false, nil
	}
	return
}

given a pointer

@wumoxi
In my case:
func someFunc(db *gorm.DB, userId string) (*schema.SubscriptionRequests, error){
	var r Xyz
	find := db.Table("tbl").
		Where("userid = ? and active = ?", userId, true).
		Take(&r)

	if find.Error != nil {
		log.Error(find.Error)
		return nil, find.Error
	}
	return &r, nil
}

Where is the nil pointer?

@kagile You can do this
func someFunc(db *gorm.DB, userId string) (r *Xyz, err error){
	err = db.Table("tbl").
		Where("userid = ? and active = ?", userId, true).
		Take(&r).Error

	if find.Error != nil {
		log.Error(find.Error)
		return
	}
	return
}

@wumoxi @klivitam-Jiang
Oh, I solved it by adding dialect to importt:
    _ "github.com/jinzhu/gorm/dialects/postgres"
@jinzhu The error is very confusing.

authors: kagile klivitam-Jiang wumoxi


text:
FR: Supporting suggestion like Manjaro

Majaro enables suggestion (basically, showing a matching entry in history as a pale background text) like below by default. On Arch, I installed https://github.com/wszqkzqk/easy-zsh-config and it enabled it by default. I would like to have this feature, but after installing alpine-zsh-config and zsh-autosuggestions, it doesn't work, and I don't know how to make it work.
It would be nice if alpine-zsh-config enabled suggestion by default, or at least when the zsh-autosuggestions package is installed.

but after installing alpine-zsh-config and zsh-autosuggestions, it doesn't work, and I don't know how to make it work.

It’s supposed to work exactly like this. If it doesn’t, then you probably have some problematic configuration that breaks autosuggestions or the plugin loading (maybe Oh My Zsh?).
Try it on a clean system, just apk add zsh alpine-zsh-config zsh-autosuggestions, then run zsh, and autosuggestions should work.

authors: HubKing jirutka

repo: jirutka/alpine-zsh-config


text:
Move if name == main to main.py

These lines
Should be stripped of their surrounding if statement, and moved to __main__.py.
That way, the example can be run with python -m win10toast

Done, thank you for your help. Please check the same

Can you confirm it works with python -m win10toast?

authors: eric-wieser jithurjacob


text:
When syncing a source to a destination not all columns get copied

Version: Jitsu Next @ latest
Source postgres table:

Destination postgres table:

The source postgres table contains only one row whose scope and workspaceId fields are null (these fields are missing from the destination table).
I assume this is an issue with Airbyte but I still want to check in.

Going into the json_schema fetched after a call to /discover I get the following for this source table:
{...
    "json_schema": {
        "type": "object",
        "properties": {
            "id": {
                "type": "string"
            },
            "scope": {
                "type": "string"
            },
            "userId": {
                "type": "string"
            },
            "createdAt": {
                "type": "string",
                "format": "date-time",
                "airbyte_type": "timestamp_without_timezone"
            },
            "updatedAt": {
                "type": "string",
                "format": "date-time",
                "airbyte_type": "timestamp_without_timezone"
            },
            "preferences": {
                "type": "string"
            },
            "workspaceId": {
                "type": "string"
            }
        }
    }
}

I'm not sure if it's related that none of the fields have got any property to indicate nullable.

Look like something that we can fix on our side. We will take a look

@absorbb is this still an issue?

It's not a bug, it's how Jitsu is designed at the moment. The connector sends data to Bulker as an array (stream) of JSON object, and Bulker omits all null values. Also, it create columns on demand, so as a result the columns are not being created. But once the column will have a non-null value at least in one record coming in, it will be created.
That being said, I agree that the current design is not ideal. We will make a change that will remove null value deletion if the data is coming from Jitsu Connectors

Fixed in jitsucom/bulker:v1.0.1

Fixed in Jitsu 2.6.0

authors: absorbb antonioorct vklimontovich

repo: jitsucom/jitsu


text:
Support WRITEC Semihosting command.

This pull request implements the WRITEC semihostig command. This command writes a single character to the debug console, in this case the terminal.
@see https://developer.arm.com/documentation/dui0471/g/Semihosting/SYS-WRITEC--0x03-?lang=en

Thanks, looks good to me!

authors: asanza jjkt

repo: jjkt/zmu


text:
Password reset

Need some way to reset passwords securely. @lol768 surely has input.

Here's my view of an ideal password reset mechanism:

User submits email requesting password reset
If user has not been rate limited for this activity already, a token 3-tuple is generated and persisted:

The first item in the typle is a "selector" - a UUID used to retrieve the token. This is probably a primary key
The second item is a reasonable number of random bytes generated with a secure RNG and passed through a BCrypt-like function. The idea here is to ensure that even if the database is compromised, it is not possible to recover the original plaintext token secret.
The third item that makes up the reset token is an expiry timestamp. I think 30 minutes is reasonable.

The secret part of the token should only be used to send an email to the user and them removed from memory. The URL should be of the form https://paste.gg/path/to/reset/?selector=11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000&secret=cde84bff512f60ee65b805840b1847422f4f33ec120981c4adb343fdc103cd30. The encoding used (hex here) is up to you. URL-safe Base64 is fine too.
Once the user has changed their password, they should be automatically logged in for a frictionless UX. The database entry should be removed.

If the user goes to the reset route with a valid selector but invalid secret, does it invalidate the reset or show an error?

The server should retrieve the record using the selector and verify the secret is correct using the hash verify function.

(Asked on IRC) After verifying the secret, what sort of token should be used in the form presented to the user to reset their password? Is using the selector enough? Could the entry in the database have a session_id column that is restricted to a single session when the secret is validated, so that only that session is allowed to change the password?
Anyone could POST to the reset password route, which makes me wonder if the selector ID is secure enough.

The password_reset branch is now updated. The only thing it's missing is rate limiting. I don't want to deploy to paste.gg until I'm sure it's not loaded with vulnerabilities, though.

The outline that @lol768 provided above should be fully implemented in https://github.com/jkcclemens/paste/commit/ffdf91786d6710c11c908bea36c2193a92f05827. Testing will need to be done before it's pushed to paste.gg.

🎉 Can we get a staging site?

Yeah, this will take some set-up, but I'm going to add one that you can go bananas on.

@lol768 Have you tested this on staging?

Awesome!

repo: jkcclemens/paste


text:
Add option to not consider redirects as a successful match

I've had multiple false positives because of sites that redirect URLs that don't exist to some default page. There should be an option to not consider redirects (status codes 301/302) to be successful rule matches.

Could you provide an example of a false matching URL for this, please? Per the code, only 200's should match:
From https://github.com/jkingsman/bishop/blob/master/src/js/content_script/content_script.js#L148:
if (req.status == 200) {
        if (pattern.test(req.responseText)) {
            addSiteAndAlert(url, ruleName);
        }
        return false;
}

I can't give the URL because it's an internal company URL. I opened the dev console, switched to the network tab, went to internal.companywebsite.com/tool/cgi-bin, and it redirected with a 302 to internal.companywebsite.com/tool/prod, which is what it does for all URLs.

Hm; interesting. I'll do my best to replicate that then. Thanks for the info.

On Sep 24, 2015, at 5:11 PM, Gulshan Singh notifications@github.com wrote:
I can't give the URL because it's an internal company URL. I opened the dev console, switched to the network tab, went to internal.companywebsite.com/tool/cgi-bin, and it redirected with a 302 to internal.companywebsite.com/tool/prod, which is what it does for all URLs.
—
Reply to this email directly or view it on GitHub.

I think I found the issue: https://stackoverflow.com/questions/8238727/how-to-prevent-ajax-requests-to-follow-redirects-using-jquery
So you'll never see a redirect with an XMLHttpRequest, only the status code after the redirect. Not sure what the proper workaround is.

Intriguing; good sleuthing. Not sure if there's a way around that, then.

repo: jkingsman/bishop


text:
Loaded runtime CuDNN library: 7.5.1 but source was compiled with: 7.6.0.

Thanks for the tutorial. Everything worked up to train.sh. any ideas how to fix this? TIA.
2020-07-17 20:50:48.353275: E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.5.1 but source was compiled with: 7.6.0.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.

I did not have tensorflow==1.10.0 available on my system and was using 1.15. I dropped back to 1.13.1 and now train.sh is running but not using the GPU. Is there a CPU/GPU flag somewhere? I tried CUDA_VISIBLE_DEVICES=0 but that did not help.TIA.

Oh, wait. Let me install tensorflow-gpu
https://github.com/jkjung-avt/hand-detection-tutorial/issues/17

Better
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K80           On   | 00000000:00:1E.0 Off |                    0 |
| N/A   69C    P0   143W / 149W |  11003MiB / 11441MiB |     99%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     13181      C   python3                                    10989MiB |
+-----------------------------------------------------------------------------+

repo: jkjung-avt/hand-detection-tutorial


text:
g++10 compilation succeeds but creates problems

More explicitly:
test_3_solver (tests.test_hubbardFermiMatrix.TestHubbardFermiMatrix)
Test Ax=b solvers. ... [2020-08-07 14:25] Testing solveM on C20
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Incompatible buffer format: mismatched elemental data type
Abort trap: 6

and
> python3 fullHMCEvolution.py
libc++abi.dylib: terminating with uncaught exception of type pybind11::stop_iteration:
Abort trap: 6

For context: This is only seems to happen on MacOS. I am not aware of problems with gcc10 on Linux.
The exceptions should have been translated into Python exceptions instead of triggering a termination in C++.
Can you narrow down the source of the error? Right now, I can't see the offending lines in the Python scrips.

authors: evanberkowitz jl-wynen

repo: jl-wynen/isle


text:
Incorrect scope for utf8 characters in labels

A clear and concise description of what the bug is.

ö does not get the "constant.other.reference.label.latex" that the other letters get
A minimal example to reproduce the issue

VS Code Version: 1.75.1
OS Version: W11
LaTeX-Workshop version if you use it: 9.7.0

This was because the regex class \w does not contains characters with accent. We know the \p{Alphabetic} utf-8 class.

authors: Enivex jlelong

repo: jlelong/vscode-latex-basics


text:
Transpile Vore code to regular Regex

This will not be possible for every bit of vore code but it would be really cool if people could write vore code and then convert it to a regular regex string in order to use it in other contexts without needing to import libvore
Definitely still need more planning on this to see what we can and can't do and some user experience design

Since the Vore any matches all characters and the normal regex . matches all characters except newlines we may need to add a newline character class that matches '\r\n' and '\n' characters.
Then to translate . to vore and back we can use not newline


text:
Need to resolve a "Rufus-scheduler intercepted an error:"

Sonar widget configuration:
/home/...../sonar.cfg
{ 47130628292280 rufus-scheduler intercepted an error:
47130628292280 job:
47130628292280 Rufus::Scheduler::EveryJob "3600s" {:first_in=>0}
47130628292280 error:
47130628292280 47130628292280
47130628292280 Errno::ECONNREFUSED
47130628292280 Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:939:in rescue in block in connect' Thin web server (v1.7.2 codename Bachmanity) Maximum connections set to 1024 Listening on 0.0.0.0:3030, CTRL+C to stop 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:936:in block in connect'
47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' 47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:103:in timeout'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:935:in connect' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:920:in do_start'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:909:in start' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:609:in start'
47130628292280 /home/.../jobs/sonar.rb:58:in block in <top (required)>' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:210:in do_call'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:254:in trigger_now' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:296:in block (3 levels) in start_work_thread'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:299:in block (2 levels) in start_work_thread' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:285:in loop'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:285:in `block in start_work_thread'
47130628292280 tz:
47130628292280 ENV['TZ']:
47130628292280 Time.now: 2019-07-22 11:00:00 -0700
47130628292280 local_tzone: #<TZInfo::DataTimezone: America/Los_Angeles>
47130628292280 et-orbi:
47130628292280 (etz:nil,tnz:"PDT",tziv:"1.2.5",tzidv:nil,rv:"2.5.5",rp:"x86_64-linux-gnu",win:false,rorv:nil,astz:nil,eov:"1.2.1",eotnz:#<TZInfo::DataTimezone: America/Los_Angeles>,eotnfz:"-0700",eotlzn:"America/Los_Angeles",eotnfZ:"PDT",debian:"America/Los_Angeles",centos:nil,osx:"America/Los_Angeles")
47130628292280 scheduler:
47130628292280 object_id: 47130622352620
47130628292280 opts:
47130628292280 {}
47130628292280 frequency: 0.3
47130628292280 scheduler_lock: #Rufus::Scheduler::NullLock:0x000055bae801b6e0
47130628292280 trigger_lock: #Rufus::Scheduler::NullLock:0x000055bae801b6b8
47130628292280 uptime: 0.33658528327941895 (336)
47130628292280 down?: false
47130628292280 threads: 2
47130628292280 thread: #<Thread:0x000055bae8035720@/var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:546 sleep>
47130628292280 thread_key: rufus_scheduler_47130622352620
47130628292280 work_threads: 1
47130628292280 active: 1
47130628292280 vacant: 0
47130628292280 max_work_threads: 28
47130628292280 mutexes: {}
47130628292280 jobs: 5
47130628292280 at_jobs: 0
47130628292280 in_jobs: 0
47130628292280 every_jobs: 5
47130628292280 interval_jobs: 0
47130628292280 cron_jobs: 0
47130628292280 running_jobs: 1
47130628292280 work_queue: 0
} 47130628292280 .
Exception: wrong number of arguments (given 1, expected 0)

Hello,
this is not a rufus-scheduler issue.

Sonar widget configuration:
Well, this doesn't look like a configuration file. It's rufus-scheduler telling you that an error is happening in the code you're scheduling.

Your code is trying to open a connection to the server nil on port 80. Hence the error message
47130628292280 Errno::ECONNREFUSED
47130628292280 Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:939:in rescue in block in connect' Thin web server (v1.7.2 codename Bachmanity) Maximum connections set to 1024 Listening on 0.0.0.0:3030, CTRL+C to stop 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:936:in block in connect'
47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' 47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:103:in timeout'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:935:in connect' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:920:in do_start'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:909:in start' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:609:in start'
47130628292280 /home/.../jobs/sonar.rb:58:in block in <top (required)>' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:210:in do_call'

I do not know what the final line refers to:
Exception: wrong number of arguments (given 1, expected 0)

Please fix your code.
I am closing this issue since this is not a rufus-scheduler issue.
Best regards.

repo: jmettraux/rufus-scheduler


text:
Fixed typos found in docs/refreshversions-bot.md.

I found trivial typos in docs/refreshversions-bot.md so let me fix them.
What?
Just fixed typos.
Why?
To be consistent.
How?
Replaced Verions with Versions.
Testing?
I just read the doc again after updated. 😄
I applied fixed version of .github/workflows/refreshVersions.main.kts to my project and confirmed it worked rightly.

Hello,
I believe this change should have targeted the release branch since it's documentation-only.
See the contributing guide for docs here @jmfayard and @sintario : https://jmfayard.github.io/refreshVersions/contributing/improving-docs/

Oh thanks for pointing it out, I've missed the guide. I would appreciate if my patch would be cherry-picked to the release branch. 🙇

authors: LouisCAD sintario

repo: jmfayard/refreshVersions


text:
Issue with Zuul integration

Hello,
I tried to use your project with Zuul.
However, I have a problem.
This is my scenario :

Get to service A : /test1/
Get to service B : /test2/
Get to service A : /test1/ => Bad request, zuul redirects my request to service B.

Indeed, the LoadBalancer set into the rules doesn't contains any reference to my service A after the call to the service B. It's erased by com.netflix.loadbalancer.BaseLoadBalancer:360
this.rule.setLoadBalancer(this);
In the usually case, the rule is instanciated for each service, but in my case, it's defined by RibbonDiscoveryRuleAutoConfiguration class.
this.rule = new RoundRobinRule()
Do you have an idea to fix this problem ?
Thanks.

I can take a loot into this matter, would you mind sharing minimal configuration? Are you using service discovery for the routes, or just fixed urls?

Hello,
I fix the issue by using the MetadataAwareRule in prototype scope.
        @Bean
	@Scope("prototype")
	public DiscoveryEnabledRule metadataAwareRule() {
		return new MetadataAwareRule();
	}

I use the discovery for routes (Zuul + Eureka).
Thanks.

@Keitaro75 Thanks for your feedback, I will prepare proper pull request.
Since the RibbonDiscoveryRuleAutoConfiguration had proper conditional you can use your own bean definition in your application till the next release, but this should happen soon.


text:
Create decimal or fraction button

Or at least have them all match

It has been decided that decimals are a waste of effort, mixed numbers will be the default

repo: jmwerner/recipes


text:
add second slide

Followed instructions to add a second slide

requesting to add file from jnhayashi

repo: jnhayashi/github-slideshow


text:
RGBW Fixture control interface issue

Hello and thanks for the awesome code, i started playing with HASS.io recently and learning python.
ive been finally able to replace the stage lighting software ive been using for automation (what a nightmware) with HASS.io using this plugin to send data to networked artnet lights.
ive configured my fixtures/channels inside the configuration.yaml  and i have set 2 fixtures as RGBW (12v rgbw "dumb" strip)
they are discovered as entities automatically upon restart and respond accurately.
my issue is with the control interface given for these fixtures.
when the dialog open, i can choose RGB value with the color picker (manages RGB values only) and the white channel separately.
for some reason, i am not able to set RGB to off (0,0,0) and only use the white channel (0,0,0,255) like other light fixtures outside this plugin(example : wled device).
the color brightness fader control does not work.
if i set value to 0, nothing happens  (other non dmx light fixtures will set rgb to 0 normally)
if i drag value along fader, wierd fader jumps happen on the interface but no changes on the light.
Would this be user setup error or an issue with the library? How to resolve?
Thanks for your dedicated time.
configuration.yaml snippet

light:

platform: dmx
host: 192.168.2.78
port: 6454
dmx_channels: 512
default_level: 255
universe: 0
devices:

channel: 4
name: Tv RGBW
type: rgbw
channel: 8
name: Kitchen RGBW
type: rgbw

I see the same behavior with my RGBW light strip controller.  Actually, I see the issue in the hass-dmx code is conversion from HS color to RGB, without any available brightness information in the color channel itself:
https://github.com/jnimmo/hass-dmx/blob/ebbb6930b75774ba3a381f5274d10f1b1f2b6064/custom_components/dmx/light.py#L414-L417
https://github.com/jnimmo/hass-dmx/blob/ebbb6930b75774ba3a381f5274d10f1b1f2b6064/custom_components/dmx/light.py#L518-L519
From reading the Light Entity docs, it looks like the problem could be resolved by adding explicit support for color_mode and supported_color_modes.  The Feature Map entries for "SUPPORT_COLOR" and "SUPPORT_WHITE_VALUE" will be removed in the next month or two so this is a required update.
If the dmx integration properly reports that an entity supports only COLOR_MODE_RGBW, then HA will send the rgbw_color attribute that includes correctly scaled R,G,B values, which encode the "color brightness" value we need.

repo: jnimmo/hass-dmx


text:
Implemented handling of current intensity values at national level

Fixes #9

Changes made - just need to fix the parsing for National

Changes made - just need to fix the parsing for National
It is a bit annoying the way clap handle the default value, sorry for getting you into this 😞

I get why it needs a value that is Display, as it's showing the default value in the help message...but it doesn't make much sense to me (but I'm a noob) that clap is parsing the default value's display()/string again.
Although they mention this in the docs somewhere IIRC  - something about display value needing to "survive the round trip" (I'm paraphrasing) - but I can't find the place where I see this right now.
Just odd, in an ideal world default_value_t would just skip the parsing altogether and use the provided value (that was my interpretation of how it worked, but clearly not!)

thanks for the review and suggestions @xoen

authors: jnioche xoen

repo: jnioche/carbonintensity-api


text:
RSCP

ad DERATE_AT_PERCENT_VALUE
Empirische Erkenntnis:
Das ist das Verältnis max. Einspeiseleistung / INSTALLED_PEAK_POWER in Prozent.
Beispiel: Die Anlage hat 7,7 kWp und darf nur 70% dieser Peakleistung einspeisen.
INSTALLED_PEAK_POWER = 7700 [W]
DERATE_AT_PERCENT_VALUE = 70 [%]
7700 * 70 / 100 = 5390
Die Anlage wird bei 5.390 W Einspeisung abgeregelt.
Den Wert DERATE_AT_PERCENT_VALUE kann nur der Installateur ändern.

Besten Dank.
Ich habe die Dokumentation aufgenommen. Auch die Idee mit dem Links finde ich gut. In der API befindet sich nun ein create ticket link über jedem Tag, der bereits ein paar Werte vorbelegen sollte.

authors: git-kick jnk-cons

repo: jnk-cons/easy-rscp


text:
[CM3/7] status flags influence on "branch predictor"

If true, then the last compressed processing instruction can leak secret data.

was false positive for both


text:
do not request a shell on the remote host

starting a remote command is not used or necessary for a forward-only connection
plus the SSH_HOSTUSER@SSH_HOSTNAME is not even guaranteed to have this permission,
in which case the server will always close the link after authentication,
leading to an infinite retry loop

Rebase please.

You can actually set the environment variable SSH_MODE: -Ng -L to accomplish the same result

@qmnonic : That's a really ugly hack, IMNSHO - although it works and you could use any of the user-supplied variables to pass in arbitrary options, it mixes up the forwarding mode with any arbitrary option. (With your suggestion, the forwarding modes are: L, R, or "some weird string that has nothing to do with forwarding at all").
More to the point, the container does not need a shell at all - why keep it open and unneccesarily increase the attack surface?

@jnovack : Rebased.

@qmnonic : And even worse, your suggestion does NOT "accomplish the same result": the -g option opens the forwarded ports to the whole world ("globally"); I do understand you personally might have some use-case to add that in, but claiming "same result" while opening the forwarded ports to the whole world is a) misleading at the very best or b) ignorant of the -g's function. Please clarify.

Ugly - maybe.
There is an SSH_MODE environment variable, which is defaulted to -R.  For my test case, i changed the default direction, -R to -L.
-g i might have added by accident during testing.
Shell - I thought the -N flag ensured the connection doesn't open a shell, which i thought addressed your question.  Perhaps not.  But it seems like a SSH_MODE option, so i added it there.
Feel free to ignore my suggestions.

I appreciate all suggestions, let's be civil about this.  We're all trying to make the world a better place.

authors: Piskvor jnovack qmnonic

repo: jnovack/docker-autossh


text:
IsoCenter size

Is it possible to include a feature that allows to set the size of the beamspot/isocenter circle?
Edit: Would it be possible to add a dot to the center of the beamspot? Or a crosshair?

There is now an option in the Utils dropdown menu since commit 3bcf1fb24bfc6b684ea4d3ba9107f0fe6f786a09

authors: Theresa-S jo-mueller

repo: jo-mueller/RadiAiDD


text:
Fixes to get the paint example working

These two fixes got the paint example working for me.

Thanks!


text:
🛑 MegaConstruct is down

In 280f6f4, MegaConstruct (https://www.megaconstruct.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MegaConstruct is back up in 110295e.


text:
🛑 CEI Sales App is down

In ab18067, CEI Sales App (https://app.ceisales.com/login) was down:

HTTP code: 500
Response time: 247 ms

Resolved: CEI Sales App is back up in f6b800c after 14 minutes.


text:
🛑 MegaConstruct is down

In c4c0651, MegaConstruct (https://www.megaconstruct.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MegaConstruct is back up in a9409fe.


text:
The Pi4B has no support for SPI/BSC SLAVE peripheral

See post by @jhw84 in https://github.com/joan2937/pigpio/issues/278#issuecomment-508764135

The GPIO mode needed to access the peripheral have been reassigned to provide an additional master SPI interface.
The lack of support by the BCM2711 SoC used in the Pi4B will be noted in the pigpio documentation.

New information has come to light and the SPI/BSC SLAVE peripheral seems to work as it does on earlier Pi models with one change.
https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=265832&p=1616018#p1616018
The access to the peripheral is multiplexed to GPIO 8-11 on the Pi4B / BCM2711 SoC.
#define BSC_SDA_MOSI_2711 10
#define BSC_SCL_SCLK_2711 11
#define BSC_MISO_2711      9
#define BSC_CE_N_2711      8

My preliminary tests show that I2C seems to work as before.  I haven't tested SPI (which didn't use to work anyhow).

This is great news!  Let me know if you want me to assist with the GitHub branching stuff, or if you just patch the master branch directly I'll sync it to develop.

All I have done is locally git checkout -b develop.  So far I have only changed pigpio.c and pigpio.h.  I will need to change pigs, the Python module, and pigpiod_if2 to reflect documentation updates.  While I am at it I will probably add a little more explanatory documentation in the affected files (of a non related nature).

That works fine.
The pendantic approach is to create a separate 'hotfix-blah' branch push it to GitHub then later merge it to both master and develop.  But unless we had more cooks in the kitchen this seems too burdensome.

@guymcswain
Okay.  I created a local branch called BCM2711-BSC-slave and made the changes I wanted. I git-added the changes and then did a git push -u origin BCM2711-BSC-slave.  I thought that would put my local changes to the remote.  It doesn't seem to.  It wants me to commit the changes.
git status -uno
On branch BCM2711-BSC-slave
Your branch is up-to-date with 'origin/BCM2711-BSC-slave'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   pigpio.3
	modified:   pigpio.c
	modified:   pigpio.h
	modified:   pigpio.py
	modified:   pigpiod_if2.3
	modified:   pigpiod_if2.c
	modified:   pigpiod_if2.h
	modified:   pigs.1
	modified:   setup.py

Untracked files not listed (use -u option to show untracked files)

Any idea what I should do to get the changes to the remote so I can generate a pull request?

Go ahead and commit changes to your local branch:
git add .
git commit -m 'these are my changes...'
Now
git push
should fail but give you instructions on how to do it.
On Sun, Mar 1, 2020, 6:30 AM joan2937 notifications@github.com wrote:

@guymcswain https://github.com/guymcswain
Okay. I created a local branch called BCM2711-BSC-slave and made the
changes I wanted. I git-added the changes and then did a git push -u
origin BCM2711-BSC-slave. I thought that would put my local changes to
the remote. It doesn't seem to. It wants me to commit the changes.
git status -uno
On branch BCM2711-BSC-slave
Your branch is up-to-date with 'origin/BCM2711-BSC-slave'.
Changes to be committed:
(use "git reset HEAD ..." to unstage)
modified:   pigpio.3
modified:   pigpio.c
modified:   pigpio.h
modified:   pigpio.py
modified:   pigpiod_if2.3
modified:   pigpiod_if2.c
modified:   pigpiod_if2.h
modified:   pigs.1
modified:   setup.py
Untracked files not listed (use -u option to show untracked files)
Any idea what I should do to get the changes to the remote so I can
generate a pull request?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/joan2937/pigpio/issues/280?email_source=notifications&email_token=AHDHTDARQJCMKQIJKYSQXCDRFJIMXA5CNFSM4H6VGGMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENM5YVI#issuecomment-593091669,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHDHTDGRVTY74WM46S7MTULRFJIMXANCNFSM4H6VGGMA
.

I did a local commit and then pushed and it seems to have done what I expected.  The branch is populated with the changes.
Should I now create a pull request?

Yes.  Do the PR with respect to 'develop' branch first to see how it all plays out.

I recommend we leave it in 'develop' until we get some feedback from users before merging into master.  I just got some pi4 hardware and would like to give it a go as another check.

I wonder if something changed in latest Raspbian.  I downloaded latest '2020-02-13-raspbian-buster-lite', then:
wget https://github.com/joan2937/pigpio/archive/develop.zip
unzip develop.zip
cd pigpio-develop
make
sudo make install

and get this error:

...
if which python3; then python3 setup.py install ; fi
/usr/bin/python3
Traceback (most recent call last):
File "setup.py", line 3, in
from distutils.core import setup
ModuleNotFoundError: No module named 'distutils.core'
make: *** [Makefile:107: install] Error 1

I had to sudo apt-get install python3-distutils.  Not sure if this is worthy of a note in the installation documention.

My script that bit-bangs I2C to the BSC slave is not working on Pi4.  Previously this worked on the other raspberries.  I set up the bb I2C master for GPIO 2 (SDA) and GPIO 3(SCL) - convenient for their on-board pullup resistors.  I jumper GPIO 2 to GPIO 10 and GPIO 3 to GPIO 11 to connect to BSC slave on Pi4.
BSCX api returns reasonable status information as I set the slave address.  But when I attempt the first write on the bus, I get PI_I2C_WRITE_FAILED returned from the BI2CZ api .
I'll try using different gpio pins, with external pullups, for the I2C master to see if that makes any difference.

I'll download "develop" and try some tests on a Pi4B and a Pi3B+.

I ran the tests at the end of http://localhost/pigpio/pigs.html#BSCX
It seems to work okay as far as they are concerned.
Pi4B
pi4b: $ pigs bscx 0x130305
1 18
pi4b: $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi4b: $ pigs i2co 1 0x13 0
0
pi4b: $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes
pi4b: $ pigs bscx 0x130305 # check for data
6 18 90 87 51 9 23
pi4b: $  pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
1 262338
pi4b: $ pigs i2crd 0 4 # read 4 bytes
4 11 13 15 17
pi4b: $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes
pi4b: $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
6 262338 90 87 51 9 23
pi4b: $ pigs i2crd 0 4
4 11 13 15 17
pi4b: $ pigs bscx 0x130305 22 33 44 55 66
1 327938
pi4b: $ pigs i2crd 0 5
5 22 33 44 55 66
pi4b: $

Pi3B+
pi3bp: $ pigs bscx 0x130305
1 18
pi3bp: $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi3bp: $ pigs i2co 1 0x13 0
0
pi3bp: $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes
pi3bp: $ pigs bscx 0x130305 # check for data
6 18 90 87 51 9 23
pi3bp: $  pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
1 262338
pi3bp: $ pigs i2crd 0 4 # read 4 bytes
4 11 13 15 17
pi3bp: $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes
pi3bp: $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
6 262338 90 87 51 9 23
pi3bp: $ pigs i2crd 0 4
4 11 13 15 17
pi3bp: $ pigs bscx 0x130305 22 33 44 55 66
1 327938
pi3bp: $ pigs i2crd 0 5
5 22 33 44 55 66
pi3bp: $

The following works as expected on a Pi3B+ and Pi4B.
#!/usr/bin/env python

import time
import pigpio

I2C_ADDR=0x13

def i2c(id, tick):
    global pi

    s, b, d = pi.bsc_i2c(I2C_ADDR)

    if b:

        if d[0] == ord('t'): # 116 send 'HH:MM:SS*'

            print("sent={} FR={} received={} [{}]".
               format(s>>16, s&0xfff,b,d))

            s, b, d = pi.bsc_i2c(I2C_ADDR,
               "{}*".format(time.asctime()[11:19]))

        elif d[0] == ord('d'): # 100 send 'Sun Oct 30*'

            print("sent={} FR={} received={} [{}]".
               format(s>>16, s&0xfff,b,d))

            s, b, d = pi.bsc_i2c(I2C_ADDR,
               "{}*".format(time.asctime()[:10]))

pi = pigpio.pi()

if not pi.connected:
    exit()

# Respond to BSC slave activity

e = pi.event_callback(pigpio.EVENT_BSC, i2c)

pi.bsc_i2c(I2C_ADDR) # Configure BSC as I2C slave

time.sleep(600)

e.cancel()

pi.bsc_i2c(0) # Disable BSC peripheral

pi.stop()

h=$(pigs i2co 1 0x13 0)
pigs i2cwd $h 100 i2crd $h 11 -a
pigs i2cwd $h 116 i2crd $h 9 -a

Yes, I'm able to run the above pigs i2c commands - after enabling the I2C peripheral in /boot/config.txt.
Perhaps something in my bit-bang I2C implementation.  Thanks for the quick verification.

After enabling the I2C peripheral, the bit-bang script is now passing.  I guess the on-board resisters are somehow enabled/disabled via the I2C peripheral state?  Anyway, all is working now!

That's odd.  Might be worth adding your test script.

Here it is.  Probably not helpful to those who don't use pigpio-client.
/*  Bit-Bang I2C and BSC Slave Example - for Raspberry Pi4 (BCM2711)
 *
 *  Connect SDA jumper wire between pin 3 (gpio 2) and pin 19 (gpio 10).
 *  Connect SCL jumper wire between pin 5 (gpio 3) and pin 23 (gpio 11).
 */
const pi = require('./pigpio-client.js').pigpio({host: '192.168.1.133'}); // remote pi4

const s = require('debug')('i2c_slave');
const m = require('debug')('i2c_master');

const ready = new Promise( (resolve, reject) => {
  pi.once('connected', resolve);
  pi.once('error', reject);
});

const I2C_Message = "Hello I2C,123456"; // BSC FIFO is 16 deep

ready.then(async (info) => {
  console.dir(info);

  /* BSC slave */

  // configure
  let rv = await pi.bscI2C(0x13);
  s('bsc rv = ', rv);
  let rv_s = rv.slice(1, 5);
  s('bsc status = ', rv_s);
  if (rv[0] > 5) s('bsc data = ', rv.slice(5).map(x=>String.fromCodePoint(x)).join(''));
  else s('bsc read fifo empty');

  pi.on('EVENT_BSC', async() => {
    let [count, ...data] = await pi.bscI2C(0x13);
    let bsc_stat = data.slice(0, 4);
    data = data.slice(4);
    if (count>5) {
      s('BSC Rx status = ', bsc_stat);
      s('BSC Rx data =', data.map(x=>String.fromCodePoint(x)).join(''));
    }

    // write data to the BSC Tx FIFO
    if (data.length) {
      [count, ...bsc_stat] = await pi.bscI2C(0x13, data);
      s('BSC Tx status: ', bsc_stat);
    }
  });

  /* master */

  let i2c = await pi.bbI2cOpen(2, 3, 50000);
  let buf = I2C_Message;
  m('Sending: ', buf);
  await i2c.write(0x13, buf);

  // wait BSC to receive then echo the message
  // (Alternatively, you could use a gpio to notify the master.)
  await new Promise( (resolve, reject) => setTimeout(resolve, 1000) );

  // read the BSC data and convert to string
  let [count, ...data] = await i2c.read(0x13, I2C_Message.length);
  m(`reading ${count} bytes: `)
  m('message = ', data.map(x=> String.fromCodePoint(x)).join(''));

  await pi.bscI2C(0); // reset BSC peripheral
  await i2c.close();
  await pi.end();
  console.log('Goodbye');
  process.exit();

}).catch(console.error);

Oh, forgot to mention that I had a wiring error on my jumper wires!  Late night, not enough caffeine this morning.

But it has!
The signals are at GPIO8-11 ALT3 (so shared with SPI0).
The IRQ line is 43.
DMA request of TX is 8
DMA request of RX is 9
Source: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf

authors: guymcswain joan2937 pakluba

license: unlicense


text:
Docs: fix path

Fixes the path give in the README file

Oh, thanks pal!!
I'll merge

authors: aburd joao-vitor-sr

repo: joao-vitor-sr/wofi-themes-collection


text:
Recommended version message

I had difficulty choosing between Python versions 3.11, 3.8, and 3.9, but I eventually identified a version that works properly. I suggest we include this information in the README.

OH rly? as long as it is >=3.10,<=3.13 it should work, can you share more about the errors you found?

Hi, I just tested, its working now!, maybe some other commit fixed it.
Feel free to close this issue.
Thanks

repo: joaomdmoura/crewAI


text:
need to be automatic

Hello, I am not good with programming so I am looking to make this script fully automatic, I want it always run when starting the file without asking me if I want ffsubsync or alass '"ffsubsync always for current video'"  after that, it should delete the old subtitle if this possible /:

+1 for this feature. Along with it, It'd be cool to have a folder include and exclude list, like at here in mpv-autosub](https://github.com/davidde/mpv-autosub) project.
Thank for the amazing job. The script works great.

This user-script doesn't need to be run when you load a subtitle file that is already timed. So I think it's better if you first check if the subtitles are correctly timed before running the script. Running it automatically every time might actually make things worse in certain situations.
However, if you want this feature to be implemented, you need to the the following:

add a new option to the config file
check if it is enabled on startup and call sync_subtitles()
if the file has been retimed already, do nothing.

authors: Rkso0 rizzini tatsumoto-ren

repo: joaquintorres/autosubsync-mpv


text:
Patch for Discord Electron Security Update (e.g. Canary currently)

ED itself and most of the built in plugins are working again.

ED Settings functional.
Injection not crashing.
Hidden channels mostly works, except showing the hidden channels, and no server settings option.
Devtools custom warning text still broken.
Stable support not harmed so far.
Due to Discord's electron security updates (which is why a breaking patch was needed in the first place), remote module is no longer relied on by ED, and plugins can no longer use it. (as of now).
BD Plugin support is broken, but was tweaked so it could fail w/o breaking some ED plugins (like ed settings) if it was enabled by the user.

Addresses Issue #143

Additions to description since, so others can know:

ED sometimes won't load, because I had to bypass the check for webpackJsonp, due to the way I'm accessing it not working w/ the check.

Additions to description since, so others can know:

ED sometimes won't load, because I had to bypass the check for webpackJsonp, due to the way I'm accessing it not working w/ the check.

Attempt was made at resolving such issue.

Additions to description since, so others can know:

ED sometimes won't load, because I had to bypass the check for webpackJsonp, due to the way I'm accessing it not working w/ the check.

Attempt was made at resolving such issue.

Well, that failed

Partially repaired BD Plugin compatibility (stuff like the on switch event, still isn't properly handled)


text:
Basic demo with OpenGL and 3D audio

Basic demo for scala.js-games
Should run on the JVM (LWJGL OpenGL+OpenAL) and Scala.js (WebGL + Web Audio API)
Controls:

Classic free look: WASD to translate the camera (E and C for vertical movements) + the mouse for the orientation
Toggle fullscreen with F
Toggle Pointer Lock with L
Quit with Esc (you may need to press it twice if the pointer lock or fullscreen is enabled in the Scala.js version)
Toggle test sound (a 1kHz generated from the ball) with M, increase and decrease the volume with + and - (of the numpad)

Instruction to launch it in the README.

Thanks for the review! I will correct these issues ASAP.

repo: joelross/scalajs-games


text:
Update .env.sample

to include WEATHER_TOKEN field (weather API)

Have at it :)

repo: joey-colon/lion


text:
Update main.ts

Changed order of "Tab" priority so that fractions can be quickly written inside of matrix/cases blocks.
By default, pressing "Tab" while writing a fraction inside a matrix creates a "&" which can be annoying.

@Virusmint Thank you so much for resolving the bug!

authors: Virusmint joeyuping


text:
Catchup with latest API updates

Refer to next version

Hello! Thank you for submitting an issue.

@jofftiquez when will this feature available? :)

@ccfiel now that there's someone interested I might expedite the ETA. I thinking, tomorrow, in-time for Easter Sunday. :)

@jofftiquez wow! thanks for the update! :)

Hello @ccfiel the latest updates are now available in this branch feat/next.
Tests are all passing. I will merge this soon today as soon the docs are done.
There has been some major changes in the syntax of using the paymongo instance. I decided to mimic the Stripe's node.js library pattern. E.g. stripe.subscriptions.create()
Altho the docs are not yet completed, you can test the build in the ./dist folder. For your convenience here are all the available available methods.
const paymongo = new Paymongo(process.env.secret);

// Payment Methods
paymongo.paymentMethods.create(data);
paymongo.paymentMethods.retrieve(id);

// Payment Intents
paymongo.paymentIntents.create(data);
paymongo.paymentIntents.retrieve(id);
paymongo.paymentIntents.attach(id, data);

// Sources
paymongo.sources.create(data);

// Payments
paymongo.payments.create(data);
paymongo.payments.retrieve(id);
paymongo.payments.list();

// Tokens (DEPRECATED)
paymongo.tokens.create(data);
paymongo.tokens.retrieve(id);

// Webhooks
paymongo.webhooks.create(data);
paymongo.webhooks.retrieve(id);
paymongo.webhooks.list();
paymongo.webhooks.toggle(id, action); // action = 'enable' or 'disable'

@jofftiquez wow that was fast! thanks! I will test it

@ccfiel btw it's already release try v1.0.0

Thanks! 😀

authors: ccfiel jofftiquez

repo: jofftiquez/paymongo


text:
any update in log-openvpn-users.pl?

Hello jofrep,
I want to use your openvpn log perl script, it is just awesome, thank you for that,
I wonder if there any update in your code or not.
Thank you beforehand.

Hi,
there is no update. It is working fine in my servers
sorry for the long delay
Jofre

authors: fattalgazi jofrep

repo: jofrep/scripts


text:
DbUpMigration - Secret (environment) variables not accessible

Hi
First of all thank you for the AzureDevops Task!
I encounter the following issue:
DbUp does not pick-up variables that are marked as secret.
Looking to the source code it seems that the values are directly read from environment variables in powershell but (by design) secrets aren't mapped to environment variables (see documentation).
In the following issue they suggest to use input fields.
Is this something that can be considered?

Thank you!
Yes. I am aware of the issue.
I think that the hardest problem to solve is how to make the GUI. The only thing I can think of is to have a multi-line textbox where each line needs to be in the format myname=myvalue. But is that good enough? Do you have any other suggestion?
Meanwhile, I think a workaround would be to use a PowerShell task before the DbUp task where you use the a logging command such as:
Write-Host "##vso[task.setvariable variable=MYNAME;]($mysecret)"

Thank you for the suggested workaround.
I would base my UI on one of the following tasks

Azure Resource Group Deployment Task
The task has an input field called overrideParameters which has the same problem. Microsoft uses the following task.json input field configuration:

{
    "name": "overrideParameters",
    "type": "multiLine",
    "label": "Override template parameters",
    "defaultValue": "",
    "required": false,
    "groupName": "Template",
    "helpMarkDown": ".. ",
    "properties": {
        "editorExtension": "ms.vss-services-azure.azurerg-parameters-grid"
    }
}

However I don't know if you can use the editorExtension yourself (something to test).
See https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AzureResourceGroupDeploymentV2/task.json

Powershell task

Microsoft uses the following setting for this in it's task.json.
"showEnvironmentVariables": true

See https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/PowerShellV2/task.json
I think I prefer the second UI, also I suspect it allows you to use the same code as you have now. If you add an entry like DBUP_SECRET with value $(SECRET) I'd expect it to be available in your powershell script.
If I come up with other tasks that try to solve the same issue I'll let you know.

authors: SebastiaanPolfliet johanclasson

repo: johanclasson/vso-agent-tasks


text:
The DNS UPDATE receiver is still too kludgy

[ ] Don't do checks against the update policy for each RR in the update during apply. All that should be sorted out during the approve phase.
[ ] Approve should be all or nothing. If a single RR fails to meet the update policy then the entire update should be rejected.
[x] Clean up the code that checks whether the update modifies the delegation data for the zone or not. This is currently broken, i.e. a bug.

Analysis of whether delegation data is modified or not seems to be complete now, but is not yet used.

repo: johanix/tdns


text:
Gif images not beeing previewed

Gif images not beeing previewed
I downloaded build v-1.0.4.26 (had bug with 1.0.4.25 already when i started using tumblthree)
(https://github.com/johanneszab/TumblThree/releases)
Windows 10 x64
.Net Framework 4.0.3
Is that a common bug or that's how it's supposed to be?

Thanks for reporting!
Should be fixed in the upcoming .30 release.

authors: WyattLW johanneszab

repo: johanneszab/TumblThree


text:
Lazyload videos

Describe the feature
Are there any plans to handle videos or is this library for images only (or do I miss something)?
Additional information

[ ] Would you be willing to help implement this feature?
[ ] Can you think of other implementations of this feature?

Final checks

[X] Check existing issues.

Nevermind, I just realized that videos support the preload="none" attribute :)

repo: johannschopplich/unlazy


text:
Opening Script Kit Prompt Flashes

I installed ScriptKit on an Apple Silicon Mac.  Once I installed I pressed cmd-; and it flashes a window for less than second and then goes away.  Seems it can't find esbuild
[2023-12-21 11:00:01.419] [warn]  Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js
[2023-12-21 11:00:01.419] [warn]  ☠ ERROR PROMPT SHOULD SHOW ☠
[2023-12-21 11:00:01.421] [warn]  Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:890:9)
at moduleResolve (node:internal/modules/esm/resolve:939:20)
at defaultResolve (node:internal/modules/esm/resolve:1132:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ESMLoader.import (node:internal/modules/esm/loader:524:22)
at importModuleDynamically (node:internal/modules/esm/translators:110:35)
at importModuleDynamicallyCallback (node:internal/process/esm_loader:36:14)
[2023-12-21 11:00:01.423] [info]  3223 setScript { script: '/Users/scott/.kit/cli/error-action.js' }
[2023-12-21 11:00:01.424] [warn]  Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js

I'm having the exact same problem. Fresh install on latest macOS (14.2.1), haven't been able to use the app yet due to this issue: the window opens for a fraction of a second and then disappears.

@scottfwalter @iliyang

Check the setup/main.log:

Please share this file, it contains what happened during install:
~/Library/Logs/Kit/main.log

Check if ~/.kit looks correct:

During the setup process, the app downloads the SDK from then extracts the SDK to ~/.kit. It's possible this step failed:
https://github.com/johnlindquist/kitapp/releases/tag/v2.2.8
(Make sure to check the os and architecture)

Check if esbuild exists:

After the SDK is installed, the app attempts to install esbuild, it's possible this step failed, you could fix it like this:

Quit Kit.app

then in the terminal:
cd ~/.kit
~/.knode/bin/npm i esbuild

Open Kit.app

Report back
Let me know if this fixes it

Preventing this in the future
That whole SDK/esbuild install process was required because I hadn't yet figured out all the various nuances of targeting different OS/arch during the GitHub actions build process. This caused all sorts of cross platform issues (and trust me, trying to debug a Windows arm64 issue when you don't have a Windows arm64 machine is not fun 😅).
I think I've got the build sorted enough that I can finally bundle the SDK/esbuild with the app and completely avoid that annoying initial install.

Thanks for the reply! I ran step 2 and it works now!

authors: iliyang johnlindquist scottfwalter

repo: johnlindquist/kit


text:
Moving $emit, $broadcast, or $on to a factory?

John, in Y031 you mention the following:

For example when publishing and subscribing events using $emit, $broadcast, or $on consider moving these uses to a factory and invoke from the controller.

Could you expand a bit on how to implement this? A code sample would be nice!

I wondered this too and found the following stackOverflow question/answer: http://stackoverflow.com/questions/14056874/how-to-emit-events-from-a-factory
I'm fairly beginner as far as angular goes, so if this is bad practice, someone please tell me. :)

great insight here http://stackoverflow.com/questions/11252780/whats-the-correct-way-to-communicate-between-controllers-in-angularjs/19498009#19498009

I think it is also depending on weather you are in a pure angular project or a legacy/hybrid project.
i.e. you want to share same event inside and out side Angular framework
making the pub/sub into a factory make alternative implementation easier to replace $emit, $broadcast.
e.g. http://jonathancreamer.com/an-angular-event-bus-with-postal-js/

I'm too having some trouble understanding the following sentence from Y031:

Consider using $scope in a controller only when needed. For example when publishing and subscribing events using $emit, $broadcast, or $on consider moving these uses to a factory and invoke from the controller.

So the conclusion of the above sentence is to avoid broadcasts at all with the use of factories? If so, I'd suggest a different formulation.

If I understand correctly, I think you are confused @sebastianhaas. This passage in the style-guide is suggesting moving the usage of $emit, $broadcast, or $on to a factory, not replacing the usage with a factory.

Thanks for your answer @zachlysobey! Yes, but how would you achieve that? Lets assume I want to update values in a controller on certain broadcasts. If I move those $on's to a factory, I'm wondering how to inform the controller again.

Let me clarify ... I had a confusing sentence in there. The point was to only use $scope when needed. Which is when you have to have a scope to handle the job. This includes broadcast or emit. Those are OK in the controller if, and only if, a message is what you need to send. But you may also want to consider other options too.
I was trying to be careful here because I want to discourage scope.apply in controllers too.
I removed the sentence.

Thank you very much!

authors: johnpapa kdekooter meldaravaniel sebastianhaas zachlysobey zdjohn

repo: johnpapa/angular-styleguide


text:
Remove unused code

As found by codeql
https://github.com/johntalton/ds3502/blob/c193e3fd5d8ca6530f73e1ccf10a43fdacf7f34f/examples/set.mjs#L34-L34

Also
https://github.com/johntalton/ds3502/blob/c193e3fd5d8ca6530f73e1ccf10a43fdacf7f34f/src/ds3502.mjs#L5-L5


text:
Getting 'HTTP_SIGNATURECERTCHAINURL' when running flask_ask behind a proxy

Hey, I tried running flask-ask behind the lambda-proxy by Matt Kruse and get the attached error. It seems to be that the JAVA ASK SDK  has a flag to turn off the key check. Maybe a cool feature for flask-ask as well?
54.162.204.77 - - [04/Nov/2016 18:46:32] "POST / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_ask/core.py", line 400, in _flask_view_func
    ask_payload = self._alexa_request(verify=self.ask_verify_requests)
  File "/usr/local/lib/python2.7/dist-packages/flask_ask/core.py", line 369, in _alexa_request
    cert_url = flask_request.headers['Signaturecertchainurl']
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1312, in __getitem__
    return _unicodify_header_value(self.environ['HTTP_' + key])
KeyError: 'HTTP_SIGNATURECERTCHAINURL'

Is the second config option on this page what you are asking for? https://alexatutorial.com/flask-ask/configuration.html
I'm running flask-ask behind haproxy fine.

Thanks, that should solve it. Could you please give me a hint on setting them? Wasn't obvious from the docs for me.

In case others stumble upon this issue (as I did) the syntax to set config (source #37)
app.config['ASK_VERIFY_REQUESTS'] = False
where app = your appname

authors: IwanLD digiltd foxy82

repo: johnwheeler/flask-ask


text:
Remove Pointless Cache Complexity

Web2 has a cache system using redis that seems to be used for no real reason in this case.
What is that advantage of looking up a cached API URI for a user and then using that uri to fetch the user from the API vs asking the API for a user matching a specific username?
The only assumption (i have checked as far as I can) I am making here is that usernames are unique and that asking the API for a user by username will only return one result. This should not be an issue though as in the current code on a cache miss the user is fetched from the API by username, the first result used, and then the resulting user URI is cached to a key of the users username so in effect if multiple users were an issue then it would still be an issue.
I really see no need for this complexity in the code.

Thanks @cal-tec

authors: cal-tec railto


text:
fix: correctly render existing bonds in Safari

It seems Safari is not able to construct Date objects from strings formatted as yyyy-MM-dd 00:00:00 (see stackoverflow#4310953).
Before this commit, as soon as a user on Safari created a fidelity bond, an error was thrown and the page became Earn page did not render.
After this commit, the fidelity bond is shown correctly and the Earn page renders successfully.
This is an untested change, as every attempt to run Safari failed on my workstation. It be great if someone can verify that it works as expected. However, the root problem should be addressed, as all date objects are instantiated with a timestamp (type number) which every browser supports.

I was able to create a FB without issues on current master commit 9d1575f running Safari Version 16.2 (18614.3.7.1.5).
Thus running the changeset of this PR has no effect for me, it seems?

I was able to create a FB without issues on current master commit 9d1575f running Safari Version 16.2 (18614.3.7.1.5).

Just fyi, this has been reported by two distinct users on Safari. After creating a FB, Jam "crashed" (showing the error page). Switching to a different browser has been a successful workaround. Unfortunately, I do not know which version of Safari they used.
Additionally, it is still safer to use the unix timestamp appended to the path of the UTXO, than to pass the raw locktime property to the Date constructor. e.g.
{
  [...]
  "path": "m/84'/1'/0'/2/40:1682899200",
  "locktime": "2023-05-01 00:00:00",
}

That's why it might be good to be merged.
What do you think?

authors: dergigi theborakompanioni

repo: joinmarket-webui/jam


text:
[build] Add --add-modules=jdk.attach for maven-compiler-plugin in age…

…nt/jvm when in JDK9+

retest

repo: jolokia/jolokia


text:
Cannot add server

Everytime I try to add a server to the App I go through the auth flow and end up on a screen saying: "Your client should now be connected! You can close this window.". But when I close the window it does not show the server in the list

What version of Nextcloud are you running? NextStats polls your server for login credentials while you are signing in through the web view. The page automatically closes when the app authenticates and adds a new server when the credentials are captured.

I am running on 21.0.3. How often does it poll?

Once the login page is opened it begins polling the endpoint every 2 seconds.

whats the endpoint?

https:/[yourserver.com]/index.php/login/v2/poll

okay i activated the access log of my nginx server for testing purposes. When i try to hit the endpoint in my browser (just to check if not my reverse proxy is messing up) it shows up there. But my iPhone is not showing up there.

okay update. i redid it with the access log activated.
10.10.5.200 - - [10/Jul/2021:21:56:12 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:15 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:17 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:19 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:21 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:23 +0000] "POST /login HTTP/1.1" 303 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
10.10.5.200 - - [10/Jul/2021:21:56:23 +0000] "GET /login/v2/grant?stateToken=djbc9lCvOEsRi8usjgSCfb2nuYFpBIHxaZVYZrca0vAINnDvq9KQkr1RRUJRSJWo HTTP/1.1" 200 3731 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
10.10.5.200 - - [10/Jul/2021:21:56:23 +0000] "GET /apps/accessibility/css/user-c470bd34ef01903873dfb30df27ebb81 HTTP/1.1" 200 3864 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
10.10.5.200 - - [10/Jul/2021:21:56:24 +0000] "POST /login/v2/poll HTTP/1.1" 404 2 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:25 +0000] "POST /login/v2/grant HTTP/1.1" 200 3514 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
10.10.5.200 - - [10/Jul/2021:21:56:26 +0000] "POST /login/v2/poll HTTP/1.1" 200 164 "-" "NextStats for iOS"
10.10.5.200 - - [10/Jul/2021:21:56:26 +0000] "GET /index.php/apps/theming/image/logo HTTP/1.1" 200 870 "-" "NextStats for iOS"

for me this looks like the app gets the poll but does not do anything

Can you check in your nextcloud under Settings > Personal > Security > Devices & sessions and verify that "NextStats for iOS" shows up.
If this shows up, then I believe there is an issue in saving app password credentials. Thanks.

Alright, thanks. If you can give me a copy of the JSON file located at the following endpoint I can recreate your server environment and try to duplicate the issue on my end for debugging.
https://[yourserver.com]/ocs/v2.php/apps/serverinfo/api/v1/info?format=json

Okay! I've put it on Hastebin: https://hatebin.com/qvuqdzwveo

Does your server have a custom logo?

yep. why?

It is a SVG File tho

I was able to replicate the issue and it looks like the culprit was in the way it checks for and saves custom logos. If the logo could not be converted into a UIImage, it would not close the window and save the credentials. I have corrected this issue in my latest commit. Are you able to test builds from source? If not, I have submitted this new build to the App Store and am awaiting approval.

If you have a unsigned IPA file I can test it out.

I actually had the review process expedited. It's in the App Store if you would like to test it out.

okay i just downloaded the update and everything seems to work now! I added it and I see all the stats :D
thanks for the quick bux fix. Always happy to see how one line of code can mess up this bad haha.
It now shows me a generic Image (i guess) it would be great to see if u could add the feature that it could convert a svg image to a UIImage or to add a custom image in the App (to overwrite the one) but that isnt really a top priority. I am just glad it works now ^^

Yeah that's definitely in the works. I'm glad it's all fixed! Thanks for helping me out.

authors: ItzYanick jonalaniz

repo: jonalaniz/NextStats


text:
Set up CI with Azure Pipelines

(this is just to test it out, I don't currently plan on switching)

Seems to work pretty well, but more first-class Rust support would be nice (aka language: rust which comes with rustup and the stable toolchain installed; or better caching of Docker containers).
https://dev.azure.com/jonas0965/jonas/_build/results?buildId=10
Closing for now.

Also might be useful to check out this: https://github.com/spontoreau/rust-azure-devops