Requests.put blocking on Windows (Tika-Python)

Over in the Apache Tika Python Port I'm noticing in tika-python#44 and in tika-python#58 some odd behavior with requests on Python 2.7.9.  Anyone else seen this?

Any requests call that uploads a request body will send the entire body before attempting to read the response. That means that, if the remote end does not close that connection abruptly (throwing an Exception on our end), we'll block until the response has been entirely sent.
Sadly, we don't support the 100-continue flow at this time (because httplib has no way of letting us see what's going on there), so it's difficult for us to do anything else.

Hi @Lukasa - what's weird though is that this works fine on *Nix and Mac. Tika Python is a Python library  that uses (at its lowest level) requests to talk to the Tika JAX RS Server. It posts to the /rmeta endpoint. On Linux, calls like parser.from_file() work fine - on Windows, they block and block and then finally timeout. I'm not sure how the answer above has to do with that behavior but perhaps I didn't explain it well enough. Any ideas?

Here's what I'm seeing on the Tika server end:
{{{
Aug 14, 2015 7:32:38 PM org.apache.tika.server.resource.TikaResource parse
WARNING: rmeta: Text extraction failed
org.apache.tika.io.TaggedIOException: timeout
at org.apache.tika.io.TaggedInputStream.handleIOException(TaggedInputStream.java:133)
at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:103)
at org.apache.tika.io.TikaInputStream.peek(TikaInputStream.java:489)
at org.apache.tika.parser.pkg.ZipContainerDetector.detect(ZipContainerDetector.java:83)
at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:61)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:112)
at org.apache.tika.parser.RecursiveParserWrapper.parse(RecursiveParserWrapper.java:159)
at org.apache.tika.server.resource.TikaResource.parse(TikaResource.java:244)
at org.apache.tika.server.resource.RecursiveMetadataResource.parseMetadata(RecursiveMetadataResource.java:86)
at org.apache.tika.server.resource.RecursiveMetadataResource.getMetadata(RecursiveMetadataResource.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jetty.io.EofException: timeout
at org.eclipse.jetty.http.HttpParser.blockForContent(HttpParser.java:1200)
at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:61)
at java.io.FilterInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:99)
... 40 more
Aug 14, 2015 7:32:38 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://resource.server.tika.apache.org/}MetadataResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jetty.io.EofException
at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:914)
at org.eclipse.jetty.http.HttpGenerator.complete(HttpGenerator.java:798)
at org.eclipse.jetty.server.AbstractHttpConnection.commitResponse(AbstractHttpConnection.java:650)
at org.eclipse.jetty.server.AbstractHttpConnection$Output.close(AbstractHttpConnection.java:1106)
at org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:626)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.flushHeaders(JettyHTTPDestination.java:286)
at org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStream.close(AbstractHTTPDestination.java:784)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.AbstractHTTPDestination$BackChannelConduit.close(AbstractHTTPDestination.java:720)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 24 more
Caused by: java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:293)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:404)
at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:844)
... 33 more
Aug 14, 2015 7:32:38 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://resource.server.tika.apache.org/}MetadataResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: XML_WRITE_EXC
at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:102)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:371)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxIOException: null
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:255)
at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:100)
... 26 more
Caused by: org.eclipse.jetty.io.EofException
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination$JettyOutputStream.write(JettyHTTPDestination.java:325)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
at com.ctc.wstx.sw.EncodingXmlWriter.flushBuffer(EncodingXmlWriter.java:705)
at com.ctc.wstx.sw.EncodingXmlWriter.flush(EncodingXmlWriter.java:174)
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:253)
... 27 more
}}}
And then on the requests end:

note this is all occurring using localhost. System env info:
Tika Server - Tried with JDK 1.8, and also with JDK 1.7.
Tika Python 1.9.10
Requests 2.7.0
Python version 2.7.10

Another interesting note. requests.put works fine on windows as long as I read the whole file into memory first, e.g., if I pass open(filename, 'r').read() into the data parameter for the PUT request. If I pass in just open(filename, 'r') as the data parameter, it hangs forever until the BadStatusLine.

@chrismattmann so there's (as you could guess) a significant difference in behaviour between those two test cases.
When you just give us the raw data as a string, we write it all at once. When you give us an open file descriptor, we pass it down to httplib. What httplib then does with it is read 8192 bytes (yes 8 KB) at a time and write it to the socket to stream it. Note this is not the same as a chunked upload.
I suspect that Tika server doesn't like getting such small amounts over a period of time.

If you want to test sending larger chunks (by forcing httplib to send what it reads) you could tinker with https://github.com/sigmavirus24/requests-toolbelt/pull/84/files to wrap your file to see if uploading more at once will aid this.

OK, here is some more info. If I use something like:
requests.put(serverUrl, files={'filename' : open(filename, 'r')}, headers=headers)

Works as expected (however it makes Tika server get a 415 b/c for whatever reason Content-Type isn't passed in the HTTP request). However:
requests.put(serverUrl, data=open(filename, 'r'), headers=headers)

still fails.

@sigmavirus24 thanks for the insight. I'll take a look at #84

One thing too @sigmavirus24 that is kind of odd though - this same behavior with e.g., data=open(filename, 'r') works fine on Linux, e.g., with Tika-server running on Linux and Tika Python running on Linux. It only seems to fail on Windows.

Ahh, quick insight too, the 415 error request on Tika server is caused by the following content type passed: (multipart/form-data;boundary=d764925698424d719281a56941edb9b7). So it seems that files={'filename', open(filename, 'r')} causes a multi-part request using PUT; however, data=open(filename, 'r') doesn't.
Full Tika Server stack trace:
Aug 14, 2015 7:55:44 PM org.apache.tika.server.resource.TikaResource logRequest
INFO: rmeta (multipart/form-data;boundary=d764925698424d719281a56941edb9b7)
Aug 14, 2015 7:55:44 PM org.apache.tika.server.resource.TikaResource parse
WARNING: rmeta: Text extraction failed
org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.server.resource.TikaResource$1@8a9107e
	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:283)
	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
	at org.apache.tika.parser.RecursiveParserWrapper.parse(RecursiveParserWrapper.java:159)
	at org.apache.tika.server.resource.TikaResource.parse(TikaResource.java:244)
	at org.apache.tika.server.resource.RecursiveMetadataResource.parseMetadata(RecursiveMetadataResource.java:86)
	at org.apache.tika.server.resource.RecursiveMetadataResource.getMetadata(RecursiveMetadataResource.java:68)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)
	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Unknown Source)
Caused by: javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media Type
	at org.apache.tika.server.resource.TikaResource$1.parse(TikaResource.java:111)
	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)
	... 36 more

@chrismattmann please be aware that while you debug this in the comments on a closed issue, you're emailing potentially over 700 people subscribed to issues (creation, comments, etc.)

sorry about that. I just thought providing more information would help. I'll stop spamming now while I continue to try and debug this.

As an FYI, I don't consider this issue fixed/closed. It's unclear to me where the precise error here is - seems to be either in the way that requests generates PUT HTTP requests when passing data=open('filename', 'r') (which doesn't work on Windows when contacting Jetty from Tika Server on localhost) compared to the way it generates PUT HTTP requests when doing files={'filename' : open('filename', 'r')} (which works on Windows when contacting Jetty from Tika Server on localhost). I've seen things debugging around that Jetty by default uses Memory mapped IO which locks files on Windows. Not sure if that's the root cause of the issue here or not. Anyways wanted to share that.

To be clear, the root cause of the issue is likely to be in httplib, or possibly even lower (e.g. WinSock). Requests simply doesn't have a separate code path here.

So I've lost my touch with reading Java stacktraces to be honest but I see
org.apache.tika.io.TaggedIOException: timeout

And I wonder if Tika has a timeout such that if it doesn't receive the full amount of data in that period, it times out the request and closes the socket. It could be attempting to protect against bad actors who do slow uploads to DDoS the server.

thanks @Lukasa and @sigmavirus24 . The odd thing is this is an extremely small file (default win.ini) and the behavior is that i make the post - then it waits for like 2-3 minutes, then times out. Just odd.

@chrismattmann That was not clear to me previously, and makes the whole thing substantially more interesting.
I think I've seen something like this on hyper, and couldn't work out what was going on: I was getting situations where I was failing to read data I knew was in the socket buffer. See also: lukasa/hyper#142.

@chrismattmann that would have been helpful to know at the beginning of this thread. That description seems a bit more consistent with
[snip]
Caused by: org.eclipse.jetty.io.EofException: timeout
    at org.eclipse.jetty.http.HttpParser.blockForContent(HttpParser.java:1200)
[snip]
Caused by: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:914)
[snip]
Caused by: org.eclipse.jetty.io.EofException
    at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142)

Note that those are from what I believe are three separate tracebacks, but my Java debugging is several years old and quite rusty.
Could you share exactly the file that you used? Further, what happens if you open the file as
with open(file, 'rb') as fd:
   ...

(or the equivalent in your code).
Let's also try some other permutations:

Tika Server running on a non-Windows operating system, with Tika-Python running on Windows
Tika Server running on Windows, with Tika-Python running on a non-Windows OS.

I'm fairly confident that this is a bug very far down the stack from us (which is why I'm not reopening this), but I'm interested in helping you find out enough information to report it to the appropriate place.

thanks @Lukasa  and @sigmavirus24 . Here is the file I was using:
; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1

I tried with the 'b' flag as well, and there was no difference.
As for:

Tika Server running on a non-Windows operating system, with Tika-Python running on Windows
Tika Server running on Windows, with Tika-Python running on a non-Windows OS.

Got it. I will try both and report back. Thanks for helping.

OK have an answer for this one:

Tika Server running on a non-Windows operating system, with Tika-Python running on Windows

Steps to reproduce:

CentOS centos7-x86_64-generic-cloud image, Openstack, Python 2.7.10 (default, Aug 12 2015, 04:31:43) , JDK "1.7.0_85" OpenJDK Runtime Environment (rhel-<IP_ADDRESS>.el7_1-x86_64 u85-b01) OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode) - running Tika-Server
Windows 7 Ultimate - JDK 1.8, Python 2.7.10 - running Tika-Python (client)
Following code on Windows 7 Ultimate (with a modified version of Tika-Python, diff provided last):

  from tika import parser
  parser.from_file('/Windows/win.ini', 'http://localhost:55000')

produces (Windows side):
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
 parser.from_file('/Windows/win.ini', 'http://localhost:55000')
File "C:\Python27\lib\site-packages\tika\parser.py", line 24, in from_file
 jsonOutput = parse1('all', filename, serverEndpoint)
File "C:\Python27\lib\site-packages\tika\tika.py", line 151, in parse1
 verbose, tikaServerJar)
File "C:\Python27\lib\site-packages\tika\tika.py", line 256, in callServer
 resp = verbFn(serviceUrl, encodedData, headers=headers)
File "C:\Python27\lib\site-packages\requests\api.py", line 122, in put
 return request('put', url, data=data, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 50, in request
 response = session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 465, in request
 resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 573, in send
 r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 415, in send
 raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', BadStatusLine("''",))

And on Linux/CentOS server side produces no log output on the tika-server.log file.
I verified that Windows 7 Ultimate could see the Linux machine (via Telnet, e.g., telnet linux-machine 9998).
Here's the diff:
diff --git a/tika/tika.py b/tika/tika.py
index da659ad..6a04f8a 100644
--- a/tika/tika.py
+++ b/tika/tika.py
@@ -247,8 +247,8 @@ def callServer(verb, serverEndpoint, service, data, headers, verbose=Verbose, ti
         die('Tika Server call must be one of %s' % str(httpVerbs.keys()))
     verbFn = httpVerbs[verb]

-    if Windows and type(data) is file:
-        data = data.read()
+    #if Windows and type(data) is file:
+    #    data = data.read()

     encodedData = data
     if type(data) is unicode:

OK here is part 2.

Tika Server running on Windows, with Tika-Python running on a non-Windows OS.

Steps to reproduce:

MacOS X 10.9.5, Python 2.7.8 (default, Sep 27 2014, 11:46:04)
Windows 7 Ultimate - JDK 1.8, Python 2.7.10 - running Tika-Python (server), Java version "1.7.0_60" Java(TM) SE Runtime Environment (build 1.7.0_60-b19)

Following code on Mac OS X (with a modified version of Tika-Python, diff provided last):
>>> from tika import parser
>>> parser.from_file('/Users/mattmann/.bashrc', 'http://<IP_ADDRESS>:9998')
{'content': u'\n\n\n\n\n\n\n\n\nalias tika="java -jar /usr/local/tika/tika-app-1.8.jar"\nalias ls="ls -FHG"\n\n', 'metadata': {u'resourceName': u'.bashrc', u'X-Parsed-By': [u'org.apache.tika.parser.DefaultParser', u'org.apache.tika.parser.txt.TXTParser'], u'Content-Type': u'text/plain; charset=ISO-8859-1', u'X-TIKA:parse_time_millis': u'4', u'Content-Encoding': u'ISO-8859-1'}}
>>>

No error logs from Windows as request was successful.
Here's the diff:
diff --git a/tika/tika.py b/tika/tika.py
index da659ad..6a04f8a 100644
--- a/tika/tika.py
+++ b/tika/tika.py
@@ -247,8 +247,8 @@ def callServer(verb, serverEndpoint, service, data, headers, verbose=Verbose, ti
         die('Tika Server call must be one of %s' % str(httpVerbs.keys()))
     verbFn = httpVerbs[verb]

-    if Windows and type(data) is file:
-        data = data.read()
+    #if Windows and type(data) is file:
+    #    data = data.read()

     encodedData = data
     if type(data) is unicode:

any comments here @sigmavirus24 @Lukasa ?

Right now it might be helpful if I could also see some packet capture of the failing scenario. Are you familiar with tcpdump?

hi @Lukasa nope I haven't used it. I did try and find some programs that would do this after I found out Wireshark won't capture localhost on Windows (or it will if you hack some networking routes, etc., but I tried and none of the approaches worked). Any advice here would be appreciated.

Ah, yeah, capturing localhost on Windows is tricky. I've used RawCap in the past to some effect.

hey @Lukasa yep I tried to use RawCap unfortunately the frickin' page download redirects to an non existent URL and I can't download the tool :( I also couldn't find it on the internet, sadly.

=( That's unhelpful. Is it going to be easier to temporarily bring a non-Windows box onto your LAN for the packet capture?

Hi @Lukasa well see that's the thing - this error only manifests on Windows. There are not any issues from Linux to Linux; from Linux to Windows; but there are errors Windows to Windows.

Oh, both the server and the client have to be Windows? Can we spin this up on multiple Windows boxes in AWS?

@chrismattmann did I misunderstand your earlier comments? I thought we only needed the client to be on Windows to reproduce this.

sorry guys, misspoke. Per https://github.com/kennethreitz/requests/issues/2725#issuecomment-132040020 (the Tika server running on Linux and Tika-Python [client] on Windows) which doesn't work and https://github.com/kennethreitz/requests/issues/2725#issuecomment-132092182 (the Tika server running on Windows, and Tika-Python [client] running on Linux) which does work, there are not just Windows issues, correct.

have either of you @sigmavirus24 and @Lukasa been able to replicate https://github.com/kennethreitz/requests/issues/2725#issuecomment-132040020 and https://github.com/kennethreitz/requests/issues/2725#issuecomment-132092182 on your own machines? That would help I think and I did do the work there hoping you guys would try to replicate.

I haven't had a chance to run this locally because I need to set up some Windows VMs to do that. I'll aim to do so sometime this week.

@chrismattmann I'm trying to get a hold of a friend who can reproduce this since I don't have access to Windows VMs at the moment. I've been traveling a lot lately so finding time to borrow a friend's laptop hasn't worked out well.

thanks guys

hey guys @Lukasa @sigmavirus24 either of you get a chance to try this or replicate?

Still not yet. =( I'm crazy busy at the minute and probably won't find much time until next month.

Since we're investigating this (or at least planning to when either of us find time) let's reopen it for now

guys any progress @Lukasa @sigmavirus24 ?

Nope, but I also haven't had time to. I'm pushing requests 2.8.1 today, after which time I should be able to grab some Windows VMs and investigate a bit.

Ok, 2.8.1 pushed. Let's see what I can see.

So, @chrismattmann: right now I can't reproduce because tika-python on my Windows box falls at the first hurdle:
>>> from tika import parser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tika\parser.py", line 19, in <module>
    from tika import parse1, callServer, ServerEndpoint
ImportError: cannot import name 'parse1'

Oh, nevermind, I see that this is chrismattman/tika-python#68. I'll try again with Python 2.7.

Alright, without your diff tika-python works just fine. With it, we get a hang. This is a good starting point, I can reproduce the bug now.

Cool, I have pcap files of successful and failed transactions. Here's the successful one, stripped to just the HTTP:
PUT /rmeta HTTP/1.1
Host: <IP_ADDRESS>:9998
Content-Length: 376
Accept-Encoding: gzip, deflate
Content-Disposition: attachment; filename=win.ini
Accept: application/json
User-Agent: python-requests/2.8.1
Connection: keep-alive

; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
[MCI Extensions.BAK]
3g2=MPEGVideo
3gp=MPEGVideo
3gp2=MPEGVideo
3gpp=MPEGVideo
aac=MPEGVideo
adt=MPEGVideo
adts=MPEGVideo
m2t=MPEGVideo
m2ts=MPEGVideo
m2v=MPEGVideo
m4a=MPEGVideo
m4v=MPEGVideo
mod=MPEGVideo
mov=MPEGVideo
mp4=MPEGVideo
mp4v=MPEGVideo
mts=MPEGVideo
ts=MPEGVideo
tts=MPEGVideo
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Oct 2015 11:42:51 GMT
Transfer-Encoding: chunked
Server: Jetty(8.y.z-SNAPSHOT)

30D
[{"Content-Encoding":"ISO-8859-1","Content-Type":"text/plain; charset\u003dISO-8859-1","X-Parsed-By":["org.apache.tika.parser.DefaultParser","org.apache.tika.parser.txt.TXTParser"],"X-TIKA:content":"\n\n\n\n\n\n\n\n\n; for 16-bit app support\n[fonts]\n[extensions]\n[mci extensions]\n[files]\n[Mail]\nMAPI\u003d1\n[MCI Extensions.BAK]\n3g2\u003dMPEGVideo\n3gp\u003dMPEGVideo\n3gp2\u003dMPEGVideo\n3gpp\u003dMPEGVideo\naac\u003dMPEGVideo\nadt\u003dMPEGVideo\nadts\u003dMPEGVideo\nm2t\u003dMPEGVideo\nm2ts\u003dMPEGVideo\nm2v\u003dMPEGVideo\nm4a\u003dMPEGVideo\nm4v\u003dMPEGVideo\nmod\u003dMPEGVideo\nmov\u003dMPEGVideo\nmp4\u003dMPEGVideo\nmp4v\u003dMPEGVideo\nmts\u003dMPEGVideo\nts\u003dMPEGVideo\ntts\u003dMPEGVideo\n\n","X-TIKA:parse_time_millis":"6","resourceName":"win.ini"}]
0

Here's the unsuccessful one:
Host: <IP_ADDRESS>:9998
Content-Length: 403
Accept-Encoding: gzip, deflate
Content-Disposition: attachment; filename=win.ini
Accept: application/json
User-Agent: python-requests/2.8.1
Connection: keep-alive

; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
[MCI Extensions.BAK]
3g2=MPEGVideo
3gp=MPEGVideo
3gp2=MPEGVideo
3gpp=MPEGVideo
aac=MPEGVideo
adt=MPEGVideo
adts=MPEGVideo
m2t=MPEGVideo
m2ts=MPEGVideo
m2v=MPEGVideo
m4a=MPEGVideo
m4v=MPEGVideo
mod=MPEGVideo
mov=MPEGVideo
mp4=MPEGVideo
mp4v=MPEGVideo
mts=MPEGVideo
ts=MPEGVideo
tts=MPEGVideo

There's one key difference: the content-length header! In the successful attempt, we have Content-Length: 376. In the failed attempt, we have Content-Length: 403. The body in each case is the same, as are all other headers.

This points the cause of the problem at super_len on Windows.

Actually, no it doesn't: it points the problem at tika-python.
Observe the following in my Windows Python prompt:
>>> from requests.utils import super_len
>>> f = open('/Windows/win.ini', 'r')
>>> super_len(f)
403L
>>> data = f.read()
>>> super_len(data)
376
>>> f = open('/Windows/win.ini', 'rb')
>>> super_len(f)
403L
>>> data = f.read()
>>> super_len(data)
403

This is a thoroughly amusing problem! Anyone got a guess about what's going wrong here? I'm going to leave a nice big white block while you think about it, because the answer is unexpected.
It's universal newlines. Universal freaking newlines. Check it out:
>>> f = open('/Windows/win.ini', 'r')
>>> data1 = f.read()
>>> f = open('/Windows/win.ini', 'rb')
>>> data2 = f.read()
>>> data1[:26]
'; for 16-bit app support\n['
>>> data2[:26]
'; for 16-bit app support\r\n'

When you pass the file handle into us, we ask the filesystem how many bytes there are. It says: 403. But, when you pass it through Python, it kindly strips the \r from each line, causing us to lose a few bytes. When you passed us the string this didn't matter, because we only checked how long the string was, but when you pass us a file handle it all goes wrong.
The solution? Add one character to parse1 in tika.py to ensure that you open the file as rb, not r.

FWIW, I consider this to be an issue in tika-python, not in requests. However, we may want to update our documentation to suggest opening files in binary mode to avoid this kind of problem.

Interestingly, none of our documentation has a single example of open used without binary mode. I'll just provide a docs update that warns about this, then.
@sigmavirus24 files opened in text mode is a thing we can detect in code pretty easily: is it worth us lobbing out a warning about it?

Fix available in #2825, fully 100 issues after this one was originally opened.

thanks @Lukasa and @sigmavirus24 #brosephs ♥


Desk Booking Approval: grant access generates approved_by email

Describe the bug
When a user grants access via the concierge UI, the approved_by email trigger is fired.
The approved_by email trigger should only be fired where a building zone is in manager approval mode and the booking is NOT auto approved.
Secondly when access is granted and the approved_by email trigger fires, the booking is also added to the users my day view who granted access.
To Reproduce

Create a booking.
In concierge grant access to the booking by clicking the key icon
Second booking confirmation email will be received.

Expected behaviour
Where a booking is auto approved i.e. status == approved, the approved_by email trigger should not be fired when access is granted.
Screenshots or a paste of terminal output

the booking is also added to the users my day view who granted access.
this was a requirement at some point, the frontend can change the query to not show these bookings


network speed

Description of the new feature / enhancement
display real-time network speed
Scenario when this would be used?
always on toolbar
Supporting information
No response

/dup #828


For this metricset the name of the called destination is missing.

Among other things, the Mule OpenTelemetry Agent sends aggregated metrics relating to remote service calls (- metricset.name: service_destination,  metricset.interval: 1m)
For this metricset the name of the called destination is missing.
In other record types (span.type: external)  we find service.target.name, destination.address or span.destination.resource. In this metricset we find no information which service was called.
Example
`{
"_index": ".ds-metrics-apm.service_destination.1m-default-2024.07.03-000060",
"_id": "KkRQfZABieRRS1uBvCgx",
"_version": 1,
"_score": 0,
"_source": {
"@timestamp": "2024-07-04T10:35:00.000Z",
"_doc_count": 47,
"agent":
{
"name": "opentelemetry/java"
}
,
"data_stream":
{
"dataset": "apm.service_destination.1m",
"namespace": "default",
"type": "metrics"
}
,
"ecs":
{
"version": "8.6.0-dev"
}
,
"event":
{
"agent_id_status": "missing",
"ingested": "2024-07-04T10:36:01Z",
"outcome": "unknown"
}
,
"labels":
{
"mule_api_id": "2239871",
"mule_env": "test",
"mule_home": "/opt/mule",
"process_runtime_description": "Temurin OpenJDK 64-Bit Server VM 25.412-b08"
}
,
"metricset":
{
"interval": "1m",
"name": "service_destination"
}
,
"observer":
{
"hostname": "40695aa79e54",
"type": "apm-server",
"version": "8.10.4"
}
,
"processor":
{
"event": "metric",
"name": "metric"
}
,
"service": {
"environment": "test",
"language":
{
"name": "java"
}
,
"name": "echo-eapi",
"target":
{
"type": "http"
}
},
"span": {
  "destination": {
    "service": {
      "response_time": {

"count": 47,
"sum":
{
"us": 498000
}
      }
    }
  },
  "name": "/health"
}

},
"fields":
{
"span.name": [
"/health"
],
"labels.process_runtime_description": [
"Temurin OpenJDK 64-Bit Server VM 25.412-b08"
],
"span.destination.service.response_time.count": [
47
],
"service.language.name": [
"java"
],
"labels.mule_home": [
"/opt/mule"
],
"processor.event": [
"metric"
],
"service.target.type": [
"http"
],
"agent.name": [
"opentelemetry/java"
],
"event.agent_id_status": [
"missing"
],
"event.outcome": [
"unknown"
],
"labels.mule_env": [
"test"
],
"service.environment": [
"test"
],
"_doc_count": [
47
],
"service.name": [
"echo-eapi"
],
"data_stream.namespace": [
"default"
],
"processor.name": [
"metric"
],
"metricset.interval": [
"1m"
],
"data_stream.type": [
"metrics"
],
"observer.hostname": [
"40695aa79e54"
],
"labels.mule_api_id": [
"2239871"
],
"metricset.name": [
"service_destination"
],
"event.ingested": [
"2024-07-04T10:36:01.000Z"
],
"@timestamp": [
"2024-07-04T10:35:00.000Z"
],
"span.destination.service.response_time.sum.us": [
498000
],
"ecs.version": [
"8.6.0-dev"
],
"observer.type": [
"apm-server"
],
"observer.version": [
"8.10.4"
],
"data_stream.dataset": [
"apm.service_destination.1m"
]
}
}`

Hi @holiday-sunrise, AFAIK, this module does not send these aggregated metrics. If we refer to https://www.elastic.co/guide/en/observability/current/apm-data-model-metrics.html#_example_service_destination_document, these look like the ones calculated by the APM backend server based on the span data ingested from the OTEL.

@holiday-sunrise As indicated above, these are APM server-generated metrics and not from this module. I am closing this for now. Please feel free to reopen if any information is available for the module. Thanks!


Problems with rcon

Hello! You have a wonderful application, I’m little by little figuring out how to use it. The server starts successfully and everything is fine, but I don’t understand why I can’t connect to rcon. It always uses different ports. As I understand it, because of this I cannot use the rcon web interface.
I am sorry for my English)

Because of this, I understand that I cannot use this menu.

This message isnt "bad". It just logs what the RCON Client is doing.
It always has to use a port on your computer thats actually free. that why its usually always a different one
The RCON server in the DayZ Server always listens on the same port.
Usually the RCON connection takes some time to get established after the server has started (~1-2minutes). It will then log in the server console that it has connected successfully.
If thats not happening then there might be an issue with your config or your server setup

Oh, that's it! Thank you very much for the clarification! I'll try now!

No matter how strange it may sound, after I changed the password to a different one, everything worked! The only thing I added to the empty field is Rсon IP <IP_ADDRESS>. It’s even kind of strange, because according to the standard it was exactly like that, but after adding it, it was still able to connect!


Likelihood Calculation Felsenstein

Likelihood Calculation
This PR introduces a set of functions for computing the likelihood of phylogenetic trees.
Checklist

[x] Implement the basic version of Felsenstein's likelihood calculation.
[x] Implement _get_genotype_index to find genotype indices in a mapping array.
[x] Implement _transition_probability for calculating mutation transition probabilities.
[x] Implement _calculate_likelihood to compute likelihoods using the transition probabilities.
[x] Create likelihood_felsenstein as the high-level function orchestrating the likelihood computation.
[ ] Implement a variant vectorised version of likelihood calculation function.
[x] Implement unit tests for all new functions.
[x] Add documentation and examples for new functions.

Notes

The implementation uses Numba parallel=True option in _likelihood_felsenstein.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

14 of 59 (23.73%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-6.1%) to 83.721%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

phylokit/maximum_likelihood/felsenstein.py
12
57
21.05%

Totals

Change from base Build<PHONE_NUMBER>:
-6.1%

Covered Lines:
540

Relevant Lines:
645

💛  - Coveralls

I'm adding one more test to cover all the cases

OK, ping me when ready for final review


Implement Loadable interface for exported fit results

I think it would be good if we would define an additional interface/protocol (maybe Loadable) that specifies the loading of the parameters. Then Summary classes that also have a ability to load the parameters from the summary file would inherit from that interface. That would also make the UI simpler.
The interface would contain something like this
def load_latest_parameters(filename: str) -> dict:

Originally posted by @spflueger in https://github.com/ComPWA/tensorwaves/pull/159#discussion_r525957327

Closes #99


HIVE-24358: Some tasks should set exception on failures

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@ashutoshc could you please take a look? thank you!


test(OCPADVISOR-130): Workloads table tests

OCPADVISOR-130

Codecov Report
Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (b873f48) 86.36% compared to head (5a17528) 85.17%.

Files
Patch %
Lines

...omponents/WorkloadsListTable/WorkloadsListTable.js
40.00%
15 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #637      +/-   ##
==========================================
- Coverage   86.36%   85.17%   -1.19%
==========================================
  Files          35       37       +2
  Lines        1371     1511     +140
  Branches      531      594      +63
==========================================
+ Hits         1184     1287     +103
- Misses        187      224      +37

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

/retest


added .env file and updated the version to newer ubuntu and micromamba

I made following changes:

there is a standard practice to use environment.yaml files instead of asking the user to run multiple commands with micromamba and conda
I moved from mamba and micromamba as micromamba provides cleaner environment by default
I added gpt-4o to the list (although need to check that it works)
There is a standard practice to use .env files, so if the user did not specify the key explicetly it should use .env

Hi Anton, thank you for your contribution. I just reviewed your PR and please find my comments below:

install with environment.yaml, this is very helpful, and thanks for preparing this.
move from mamba to micromamba, which is good for installation. However, for code generation from LLMs, micromamba has not been fully tested and some old LLMs may not be well-trained in using micromamba for installing software. Therefore, we prefer to stay with mamba at least within abc_runtime

Please make your PR to dev-v1.x.x branch (gpt-4o models have already been included) so we can proceed. Thank you!

I created another PR, to dev-v1.x.x where I followed @JoshuaChou2018 feedback https://github.com/JoshuaChou2018/AutoBA/pull/10


Add influxdb to arkade

Adding influxdb to arkade, with --persistence flag to request a pvc
This has been tested both on and off.
Extra args can be added in the future as we see fit.
Signed-off-by: Alistair Hey<EMAIL_ADDRESS>
Description

Motivation and Context

[x] I have raised an issue to propose this change (required)
As discussed on live stream! and https://github.com/alexellis/arkade/issues/381

How Has This Been Tested?

locally using
arkade install influxdb

# and

arkade install influxdb --persistence

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I've read the CONTRIBUTION guide
[ ] I have signed-off my commits with git commit -s
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

[ ] I have tested this on arm, or have added code to prevent deployment
https://hub.docker.com/layers/influxdb/library/influxdb/1.8/images/sha256-e762a7cc5f2fb705673b012870b836c6efd396040772d8131845c98a40acb914?context=explore
armv7, amd64 and arm64 multi-arch image

Do we need updates in the docs given the move away from GO_REPLACE? https://docs.openfaas.com/cli/templates/#go-golang-http-of-watchdog-template


CustomHTMLAnchorElement to-do

On top of #36, what else is needed?
API stuff:

[ ] .searchParams (from URLUtils) doesn't work because it tries to "convert" to SearchParams. In general I think we should stop trying to convert unrecognized WebIDL types.
[ ] .ping and .relList don't work because we can't reflect DOMSettableTokenList because we can't construct them. Filed a bug on DOM, but unclear how to resolve it
[x] Need to make .toString() delegate to .href (i.e. implement "stringifier" functionality).

Styling stuff:

[x] Styling in the UA stylesheet is not great, using :-webkit-any-link and other -webkit- things. The spec's recommendations use :link and :visited which we don't have access to. Can hack around with something like a[href] to replace :link I suppose, but I wonder if that is actually equivalent? Is being able to be influenced by :link a custom elements gap?

Behavior!

[x] Actually clicking on the link should navigate!
[ ] Should respect target
[ ] Should respect ping
[ ] Should respect download!?
[ ] Should be focusable: a big custom elements gap

Demo

[x] Make it prettier
[x] Provide an editable, updating-in-real-time view into all of the CustomHTMLAnchorElement's properties
[ ] Allow editing of the various DOM attributes
[x] Put it on gh-pages

Tests

[ ] There have to be web-platform-tests for the URLUtils parts of the API, if nothing else.

[ ] When right-clicking on a <custom-a>, the context menu lacks entries for link-specific actions (e.g. on OS X Chrome: "Save Link As…" and "Copy Link Address")


Updated the module to work with JHipster 6.x

Updated the module to work with JHipster 6.x (tested with JHipster 6.4.1)

@yakari thank you so much. We need to check why the build is failing

@murdos would you be able to take a look

@deepu105 you're welcome, I actually had a need for this module to work with JHipster 6 :)

Is there a way I can use this @yakari ? thank you


Incompatibility with timvink/mkdocs-git-revision-date-localized-plugin

Hello,
I was trying to use the MkDocs plugin timvink/mkdocs-git-revision-date-localized-plugin in my project but it always fails with:
$ mkdocs build
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /home/prcr/Codacy/git/docs/site
ERROR   -  Unable to read git logs of '/tmp/docs_kvh_ua8a/index.md'. To ignore this error, set option 'ignoring_missing_git: true'
ERROR   -  Error reading page 'index.md': Cmd('git') failed due to: exit code(128)
  cmdline: git log --date=short --format=%at -n 1 /tmp/docs_kvh_ua8a/index.md
  stderr: 'fatal: /tmp/docs_kvh_ua8a/index.md: '/tmp/docs_kvh_ua8a/index.md' is outside repository'
[...]

I was able to pinpoint the issue to the fact that I'm using mkdocs-monorepo-plugin as well. It seems that the plugin copies the *.md files to a temporary directory before building them, and this way the other plugin cannot use git log to find out the last updated date of the Markdown files.

I see that mkdocs-monorepo-plugin  copies the contents of multiple docs/ dirs into a temporary docs_/ directory at the MkDocs event on_config().
mkdocs-git-revision-date-localized-plugin uses the event on_page_markdown(), and then specifically the page.file.abs_src_path attribute of a page.
One possible solution might be to use symlinks to the temporary docs_/ folder instead of copying files. That way hopefully the abs_src_path remains intact. So replace:
https://github.com/spotify/mkdocs-monorepo-plugin/blob/3cf93fa0d433a35f3d850ffa13de2d00462e3f68/mkdocs_monorepo_plugin/merger.py#L59
with:
copytree(source_dir, dest_dir, symlinks=True)

I haven't tested this yet, but I am willing to give it a try and provide a PR?

@timvink That sounds like an interesting approach and definitely has pros compared to how we do it today of constructing a new docs/ directory in the /tmp temporary filesystem. Looking forward to seeing what your approach is and happy to provide feedback :)

Cool, will pick this up somewhere in next week!

The symlink approach didn't work, but I got it working with the second idea. Opened https://github.com/spotify/mkdocs-monorepo-plugin/pull/13, let's discuss details there!


Show Donation Amount in User's Local Currency

As a new feature, we should display the donation amount in the user's local currency instead of only in USD. This can enhance the user experience by making it easier to understand the donation amount relative to their country's currency. The feature will use geolocation to detect the user's country and a currency conversion API to display the amount in the correct currency.
Please assign me this issue as part of Hacktoberfest 2024.

After some consideration, I've decided to close this issue. Unfortunately, I'm unable to continue working on this feature at the moment due to time constraints. I hope this idea can still be helpful for future enhancements, and someone else might be able to pick it up.


Provide alternative AlexNet and GoogleNet model packages from NVIDIA's mirror

The BVLC server is usually overloaded with model download requests. In a auxilliary script for NVIDIA's Jetson Inference, we can find links to fast mirrors hosted by NVIDIA:
# AlexNet
#wget http://dl.caffe.berkeleyvision.org/bvlc_alexnet.caffemodel
wget --no-check-certificate 'https://nvidia.box.com/shared/static/5j264j7mky11q8emy4q14w3r8hl5v6zh.caffemodel' -O bvlc_alexnet.caffemodel
mv bvlc_alexnet.caffemodel ../data/networks

# GoogleNet
#wget http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel
wget --no-check-certificate 'https://nvidia.box.com/shared/static/at8b1105ww1c5h7p30j5ko8qfnxrs0eg.caffemodel' -O bvlc_googlenet.caffemodel
mv bvlc_googlenet.caffemodel ../data/networks

Committed.


Error while requesting trade data from okcoin.cn

Hi,
I have gekko running on a 32 bit install of ubuntu, it works great with every other exchange but will not start trading with okcoin. I have checked that my api key, secret, and username are correct and in okcoin allowed the permissions "trade" and "withdraw" for the api key.
See below for debug log. Notice the end of it, "okcoin returned an error, retrying.." This will go on for ever and never fetch the trade data.
2017-01-14` 09:01:35 (INFO):     Gekko v0.3.4 started
2017-01-14 09:01:35 (INFO):     I'm gonna make you rich, Bud Fox.

2017-01-14 09:01:35 (INFO):     Setting up Gekko in realtime mode
2017-01-14 09:01:35 (INFO):
2017-01-14 09:01:35 (INFO):     Setting up:
2017-01-14 09:01:35 (INFO):              Candle writer
2017-01-14 09:01:35 (INFO):              Store candles in a database
2017-01-14 09:01:35 (INFO):

2017-01-14 09:01:35 (INFO):     Setting up:
2017-01-14 09:01:35 (INFO):              Trading Advisor
2017-01-14 09:01:35 (INFO):              Calculate trading advice
2017-01-14 09:01:35 (INFO):              Using the trading method: MACD
2017-01-14 09:01:35 (WARN):     Warning, trading method has no name
2017-01-14 09:01:35 (INFO):

2017-01-14 09:01:35 (INFO):     Setting up:
2017-01-14 09:01:35 (INFO):              Trader
2017-01-14 09:01:35 (INFO):              Follows the advice and create real orders.
2017-01-14 09:01:35 (DEBUG):    getting balance & fee from okcoin
2017-01-14 09:01:35 (INFO):

2017-01-14 09:01:37 (INFO):     trading at okcoin ACTIVE
2017-01-14 09:01:37 (INFO):     okcoin trading fee will be: 0.1%
2017-01-14 09:01:37 (INFO):     okcoin portfolio:
2017-01-14 09:01:37 (INFO):              BTC: (removed)
2017-01-14 09:01:37 (INFO):              CNY: (removed)
2017-01-14 09:01:37 (INFO):              LTC: 0.000000000000
2017-01-14 09:01:37 (INFO):     Setting up:
2017-01-14 09:01:37 (INFO):              Advice logger
2017-01-14 09:01:37 (INFO):
2017-01-14 09:01:37 (INFO):     Starting to watch the market: OkCoin /
2017-01-14 09:01:37 (DEBUG):    scheduling ticks
2017-01-14 09:01:37 (DEBUG):    Requested / trade data from OkCoin ...
2017-01-14 09:01:38 (DEBUG):    okcoin returned an error, retrying..
2017-01-14 09:01:39 (DEBUG):    Requested / trade data from OkCoin ...
2017-01-14 09:01:40 (DEBUG):    okcoin returned an error, retrying..
2017-01-14 09:01:41 (DEBUG):    Requested / trade data from OkCoin ...
2017-01-14 09:01:42 (DEBUG):    okcoin returned an error, retrying..
2017-01-14 09:01:43 (DEBUG):    Requested / trade data from OkCoin ...
2017-01-14 09:01:44 (DEBUG):    okcoin returned an error, retrying..
2017-01-14 09:01:45 (DEBUG):    Requested / trade data from OkCoin ...
2017-01-14 09:01:46 (DEBUG):    okcoin returned an error, retrying..

Here's my full config file: http://pastebin.com/jfbm5zzi
Thanks!

I have the same problem here. Bump.

same for me

same for me

Same here. I debugged and got the complete error:
unable to process order: { VError: OKCoin.executeRequest() HTTP status code 403 returned from GET request to url https://www.okcoin.cn/api/v1/trades.do with parameters {"symbol":"btc_cny","since":600}
    at Request._callback (/Users/thiagoregis/Bot/gekko/node_modules/okcoin-china/rest.js:132:21)
    at Request.self.callback (/Users/thiagoregis/Bot/gekko/node_modules/okcoin-china/node_modules/request/request.js:198:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/Users/thiagoregis/Bot/gekko/node_modules/okcoin-china/node_modules/request/request.js:1035:10)
    at emitOne (events.js:101:20)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/Users/thiagoregis/Bot/gekko/node_modules/okcoin-china/node_modules/request/request.js:962:12)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
  jse_shortmsg: 'OKCoin.executeRequest() HTTP status code 403 returned from GET request to url https://www.okcoin.cn/api/v1/trades.do with parameters {"symbol":"btc_cny","since":600}',
  jse_summary: 'OKCoin.executeRequest() HTTP status code 403 returned from GET request to url https://www.okcoin.cn/api/v1/trades.do with parameters {"symbol":"btc_cny","since":600}',
  message: 'OKCoin.executeRequest() HTTP status code 403 returned from GET request to url https://www.okcoin.cn/api/v1/trades.do with parameters {"symbol":"btc_cny","since":600}',
  name: 403 }

Is this still an issue? looks a bit like a duplicate of #1008

Unfortunately OKcoin is not enabled for now..


optional Case-sensitive file system need Targets

thanks! not 100% sure of the casing of the other targets files for the other languages...


Fix/span http error

Pull Request Test Coverage Report for Build 586

0 of 0   changed or added relevant lines in 0 files are covered.
30 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.04%) to 70.101%

Files with Coverage Reduction
New Missed Lines
%

dist/plugins/config/TraceConfig.js
11
74.38%

dist/plugins/integrations/HttpIntegration.js
19
69.12%

Totals

Change from base Build 582:
0.04%

Covered Lines:
2266

Relevant Lines:
3005

💛  - Coveralls


Fix logo link url

https://uktrade.atlassian.net/browse/CMS-219

Codecov Report

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

@@           Coverage Diff           @@
##           master     #122   +/-   ##
=======================================
  Coverage   93.97%   93.97%
=======================================
  Files          23       23
  Lines         564      564
=======================================
  Hits          530      530
  Misses         34       34

Continue to review full report at Codecov.

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


fix wouldn't catch error line

order is now first test if midloop exist and than  get length

Thanks @liudger  I will check and merge the PR ASAP


Plotting multiple lines

Hello Osian!
So I'm a college student in the USA who's working on a project to plot some data in xcode (using a line graph, it's due in a few weeks) but it requires me to give the user the option to plot multiple lines. I looked at the comments on your post and I was trying to figure out how to do that with your LineChart project but it doesn't seem to be working. I created a new text field and store its values in a new array. Then I basically repeat the same thing you do in line1 for line2 (with and without creating a new LineChartData() object) but it keeps overwriting the original data from line1 when I do data.addDataSet(line2). I don't get why it's not appending it to the first object? I guess I just don't understand how to add a new line step by step to the LineChartData object. How would I go about this differently? Thank you!

You need a new [ChartDataEntry] for the new data line that passed with a label to LineChartDataSet and added via ata.addDataSet(line2)

That's exactly what I do:
func updateGraph(){
    var lineChartEntry  = [ChartDataEntry]() //this is the Array that will eventually be displayed on the graph.
    var secondLineChartEntry = [ChartDataEntry]()

    //here is the for loop
    for i in 0..<nums.count {

        let value = ChartDataEntry(x: Double(i), y: nums[i]) // here we set the X and Y status in a data chart entry
        let value2 = ChartDataEntry(x: Double(i), y: nums[i]+1)

        lineChartEntry.append(value) // here we add it to the data set
        secondLineChartEntry.append(value2)
    }

    let line1 = LineChartDataSet(values: lineChartEntry, label: "Number") //Here we convert lineChartEntry to a LineChartDataSet
    line1.colors = [NSUIColor.blue] //Sets the colour to blue

    let line2 = LineChartDataSet(values: secondLineChartEntry, label: "Number2")
    line2.colors = [NSUIColor.red]

    let data = LineChartData() //This is the object that will be added to the chart

    data.addDataSet(line1) //Adds the line to the dataSet
    data.addDataSet(line2)

    chart.data = data //finally - it adds the chart data to the chart and causes an update

    chart.chartDescription?.text = "My awesome chart" // Here we set the description for the graph
}

Which object are you trying to append to?

I actually figured it out. I'll let you know if there's anymore questions! Thank you


Still problem with apps

Thank you for the great app for chrome.
I would like to ask why am I not able to open apps such as google translate or pocket in a new tab?
I look forward to hearing from you.
Sincerely,
Joao

Bug reproduced, need to figure out how it should work.


zpaqfranz: 59.7 -> 59.8

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/fcorbelli/zpaqfranz/releases.
meta.description for zpaqfranz is: Advanced multiversioned deduplicating archiver, with HW acceleration, encryption and paranoid-level tests
meta.homepage for zpaqfranz is: https://github.com/fcorbelli/zpaqfranz
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 59.8 with grep in /nix/store/gbxjgrp9kq2qr68iflzxhh4zg3ghv4ij-zpaqfranz-59.8
found 59.8 in filename of file in /nix/store/gbxjgrp9kq2qr68iflzxhh4zg3ghv4ij-zpaqfranz-59.8

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

zpaqfranz

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/gbxjgrp9kq2qr68iflzxhh4zg3ghv4ij-zpaqfranz-59.8 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A zpaqfranz https://github.com/r-ryantm/nixpkgs/archive/bbe67d46fd4c3237ad41acfa5787970b1b355d27.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/bbe67d46fd4c3237ad41acfa5787970b1b355d27#zpaqfranz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/gbxjgrp9kq2qr68iflzxhh4zg3ghv4ij-zpaqfranz-59.8
ls -la /nix/store/gbxjgrp9kq2qr68iflzxhh4zg3ghv4ij-zpaqfranz-59.8/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

zpaqfranz

Maintainer pings
cc @AndersonTorres for testing.

@NixOS/nixpkgs-merge-bot merge


Release new version?

To get 7a811c2784bd648527d12ba1c168ecb6d8c11ea3 available. In many cases the lib doesn't without this fix, due to https://github.com/airbnb/enzyme/issues/1229.

Same here, would be awesome if you could release a new version with the latest changes. I assume that commit mentioned above is all that's needed to make it compatible with Enzyme 3?

I released a version with this fix under https://www.npmjs.com/package/@oskarer/enzyme-wait.

@oskarer thanks a lot, maybe you can release a fix for #6 too? Looks like this package has been abandoned by author.

@kirill-konshin Sure, can you submit a PR?


Add testing documentation

@omri374 @TessFerrandez Thanks for the review, pushed the fixes and would be happy for a re-review


wasm/notebook updates

Updates to wasm/notebook. Here is the main summary:

added CSS and JS support
Added ability to create python documents with "new tab"
Added split view and linked doc for code editor
Added snippets of code that show how to create a basic UI with JS, pass parameters to Python
UI fixes, import code pop-up
moved the files around to editor.js, proces.js, tools.js. Tried to clean up the code. emphasis on tried.
added an overdue readme 😆

Here is how the notebook like now:

JS support and code structure need lot of improvements.

It would be neat if there was an elegant way to communicate between JS and Python.
I was thinking of adding peer to peer collaborative editing on the notebook, so for a user, it would feel like google doc. I don't think I have seen such a feature anywhere else like with jupyter, iodide or others (I might have missed it).
I think it will be neat to add collaborative editing and useful for things like learning python and helping someone fix a small piece of code or function by going to the same URL. Do you have opinions about how to implement that with peer to peer/without servers? I was doing research about OT, webRTC, CRDTs. I saw things like YJS and a few others... any recommendations or should I do my research?
Once this PR is merged, i'll start on collaborative web editing :D

I've heard good things about CRDTs (mainly from this article) but I haven't really done anything with real-time editing/syncing before, so I don't really have any opinions. Yjs does look pretty good though.

@coolreader18 that was such a good read... especially the "what's next" section. I'll read around for my own info but I'll probably end-up using Yjs for code mirror as in https://github.com/yjs/y-codemirror


Attempt to mitigate flakiness around devtools

This does three things:

Add more asserts around the devtools launching
Add more defensive checks around the devtools launching in case we're seeing shutdown races
Enable the asserts for the web tests.

The idea is to either avoid a flake like this, or make the logs more useful:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8828452555087042433/+/u/run_test.dart_for_web_long_running_tests_shard_and_subshard_1_5/test_stdout
See also https://github.com/flutter/flutter/issues/60239

cc @zanderso @christopherfujino @annagrin


WIP: gradient support

This requires the C API to get support for it.
There is a bug here: https://github.com/tensorflow/tensorflow/issues/6268

[ ] Add port of the test suite from tensorflow/908d5b6ede6ae829dff138a873eec397ef434cd6

It seems the gradient support is recently addressed :-)
https://github.com/tensorflow/tensorflow/issues/6268

Not quite :-)
Still waiting on it.

Added the basic binding, but I have not written the tests, I updated the bug description to track that.
Additionally, the tensorflow commit [0] not all capabilities from the C++ API have been surfaced yet.
[0] https://github.com/tensorflow/tensorflow/commit/908d5b6ede6ae829dff138a873eec397ef434cd6

Is it now possible to retrieve the gradients and do some form of gradient descent?

I would like to ask the same question - using the new pre-release package that has just been uploaded to NuGet (1.3.0-pre1), is it already possible to retrieve gradients for tensors and do any form of gradient descent at this time? I am not totally currently up-to-date with the status of the C API support for this feature yet, so I guessed it would be easier to ask :-)

@migueldeicaza Hi, I started to verify AddGradients() API with code like this:
			var x = graph.Const (3.0);

			var y = graph.Square (x);
			var y1 = graph.Square (y);

			var y2 = graph.Square (y1);
			var g = graph.AddGradients (new TFOutput [] { y, y2 }, new [] {  x});

			var r = session.Run (new TFOutput [] { }, new TFTensor [] { }, g);
			double dy = (double)r [0].GetValue ();
			double dy2 = (double)r [1].GetValue ();
			Assert.Equal (17502.0, dy + dy2);

and  got couple of problems:
1.
'cstatus.Handle' should be passed to TF_AddGradients() but not 'status.Handle' variable.
2.
I'm expecting two results 6 (y derivative) and 17496 (y2 derivative) in that run according to documentation:
d(y[0] + y[1]+ ...)/dx[0], d(y[0] + y[1] + ...)/dx[1]
but the API returns only one result 6.
3.
If the number of inputs > 1 the API fails with Access to unprotected memory, for instance
var g = graph.AddGradients (new TFOutput [] { y, y2 }, new [] {  x, x2});
#1 is quite simple to fix
what do you think about #2 and #3 ? Is it binding issue or underlying native API?
Thanks.

Hi @Dorokhov,
If I understood correctly TensorFlow's documentation for AddGradients, the return vector should have the same length as the inputs vector, therefore the answer would have indeed just one value (c.f. the doc: "The partial derivatives are returned in dy. dy should be allocated to size nx." where I understand that in this case, nx would have been the length of new [] {  x } which would therefore be 1).
But maybe I am wrong, I am just starting with the gradients API. Let me see if I can find where the problem is.
Regards,
Cesar

Hi @cesarsouza,
I think you are right, and the API should produce one value - partial direvatives of 'y' sums which is 17502 (6+17496) in my case, but it returns 6. I will try to test the same case in native API.
Thanks.

I'm struggling with getting simple models built in Python "productionized" into C#.
This is what i see a first class use case for this library, but not seeing a good example for it.
Take a model built, trained, and saved in python.
Save off the *.pb file (From what i can gather, that is all i need)
In C#:
Create Graph, a Session, Input Variables, Input Values, and Outputs to run the model.
Run the model, then interrogate the output.
The most challenging part for me is constructing the InputVariables, InputValues, and Output.  The construction patterns, and instance usages for those objects are befuddling me to say the least.
I assume I am not seeing a pattern in the examples, or that I am fighting the naming conventions, or...  I don't know what I am missing...  And I can't be the only person struggling with this.
The python code is attached.  It's a  simple linear regression model I ripped off from a stanford class and made more portable.
Here are the samples i am trying to create.  Happy to donate them to the cause when they are complete.
FireTheftLinearRegression.py.txt
FireTheftLinearRegression.cs.txt

Hi @sqlBender,
I have to say I also share your pain, but I am not sure if the (actually very relevant) issue you have raised is connected to the original topic of this current issue, that is, the ability to obtain automatic gradient calculations through the AddGradients method.
If you want to take a look, the Keras Sharp project is aiming at providing an API that is very similar to its Python equivalent, but unfortunately that project is also still a bit blocked until this very issue here gets eventually addressed.
Regards,
Cesar

@cesarsouza it's just where I found an issue similar.  Gradient etc.  I'll spin up a new issue since my issue is not really related to this thread.

Started discussing the gradient API issue in the tensorflow repository, hoping we will find how the API actually works soon.

Seems like TF doesn't have all gradient operations defined yet. I am referencing here an issue I've just created in TF's issue tracker regarding a missing gradient for tf.select.

@cesarsouza The Linear Regression example can run on another .NET binding library now, check the code here.
Piece of code
            // tf Graph Input
            var X = tf.placeholder(tf.float32);
            var Y = tf.placeholder(tf.float32);

            // Set model weights
            // We can set a fixed init value in order to debug
            // var rnd1 = rng.randn<float>();
            // var rnd2 = rng.randn<float>();
            var W = tf.Variable(-0.06f, name: "weight");
            var b = tf.Variable(-0.73f, name: "bias");

            // Construct a linear model
            var pred = tf.add(tf.multiply(X, W), b);

            // Mean squared error
            var cost = tf.reduce_sum(tf.pow(pred - Y, 2.0f)) / (2.0f * n_samples);

            // gradient descent
            // Note, minimize() knows to modify W and b because Variable objects are trainable=True by default
            var optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost);

            // Initialize the variables (i.e. assign their default value)
            var init = tf.global_variables_initializer();


Update hole to 0.3.0

Description:
I needed to rename the module.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#5556
Example entry for configuration.yaml (if applicable):
sensor:
  - platform: pi_hole
    host: <IP_ADDRESS>

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code communicates with devices, web services, or third-party tools:

[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

Breaking change: The pi_hole sensor is now limited to ads_blocked_today by default and will no longer show all available data. Use monitored_conditions to list the sensors you want.

@fabaff, Just as a curiosity, I understand this was a breaking change and conditions need to be added to the monitored section to be seen, why did this needed to change? Was it performance related?


Datagrid Column Headers overlap when text is too long

Describe the bug
Column headers overlap when column is resized and column header's text is too long.
How to reproduce
Go to: https://stackblitz.com/edit/clarity-dark-theme-v012-tsdheb
Resize any of the columns except the last one.
Expected behavior
Text to be truncated and show ellipsis OR to be able to resize the columns so that column header can fit in and not less than that width.
Versions
App

Angular: 6
Node: 8.10
Clarity: 0.12.5

Device:

Type: MacBook
OS: MacOS
Browser: all
Version: latest

Additional notes

Hi @ttsvetko there is an issue for this already: https://github.com/vmware/clarity/issues/1725 The workaround at the bottom of the comments might be useful to you. Please subscribe to that issue for more updates.
Closing based on that. If that issue I linked to is different from your issue feel free to re-open this one.


[BUG] Decals spazz out like crazy when shooting at large entities

basically, when a gun shoots at a large lfs plane, it creates large decals onto them and stretches very big as seen below in the screenshot, (i uninstalled acf3 just so i could show this better), and while testing it i crashed from it.

I've noticed decals stretch out against certain models, causing them to display more than one "impact". For reference, these are two impacts, one from a 100mm cannon and another one from a 12.7mm machinegun.

Although, this is the first time I've seen them stretching out of the model like that, or even crashing the server. I'm gonna try to solve this issue I mentioned above with decals and see if that fixes your issue, in the meantime you could also ask the LFS dev about it. Impact decals on ACF-3 are applied using util.DecalEx, so it'd be possible for them to test this behavior aswell and maybe see if it's a fault on their side.

no, the server didn't crash, but i did. and i could try talking to luna.

Any news on this issue?

it seems to be fixed, and i wasn't able to see it happen since reporting it.


Add support for ABC markup language

This pull request addresses issue #1609

@acrawford13
First of all, truly sorry for the long delay in anyone responding to this PR.
Thank you so much for desiring to contribute and writing a language grammar.  Unfortunately, we currently are no longer accepting new languages into the core repository.  The existing maintainers simply don't have time to maintain new languages (fixing bugs, dealing with issues, etc).  We'd still love to host your language as a 3rd party module though - if you're willing to help maintain it.
It's easy to turn your language into a module that anyone who likes can easily integrate with Highlight.js using a single line of code:
<script src="/path/to/highlight.min.js"></script>
<!-- they'd simply add your language modules -->
<script src="/path/to/highlightjs-abc.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

It's also possible for users to rebuild the highlight.js library to include specific 3rd party modules, all in a single file (vs loading a bunch of 3rd party languages one at a time).
If you'd like to become the maintainer for this language then we're happy to create a new repository in the highlightjs organization and host the repository there.  That assumes you'd be open to reviewing issues and fixing bugs as they arise.  You're also welcome to host the repo yourself and we'll link to it from our README.
There isn't much in the way of how to docs on this yet, but there are sample repositories and it's honestly pretty easy.  We're still fleshing out an official "spec" for 3rd party modules, but even after that's done it should require minimal changes from the examples we have already.  IE, if you wanted to get started now there isn't any big reason to wait.
My own robots.txt grammar repository is a great, simple example:
https://github.com/highlightjs/highlightjs-robots-txt
If you have any questions feel free to ask.

Closing for inactivity; (also finally cleaning all these old PRs out for the new year).
As mentioned above if you're interested in becoming the maintainer of a 3rd party module, please respond [whenever you find time] and we'd be happy to help you get started.

@enderlen would this still be useful? If so I'll work on implementing it as a 3rd party module.

Yes, would still be useful ;)
I wish all the best for 2020 !
Le 2020-01-12 02:20, Andrea Crawford a écrit :

@enderlen [1] would this still be useful? If so I'll work on implementing it as a 3rd party module.
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [2], or unsubscribe [3].

--
Arnaud Enderlen
Links:
[1] https://github.com/enderlen
[2]
https://github.com/highlightjs/highlight.js/pull/1614?email_source=notifications&email_token=AHWONJYR6DPJSH6CJX7VS6TQ5JV5TA5CNFSM4D7GKG62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWPCKQ#issuecomment-573370666
[3]
https://github.com/notifications/unsubscribe-auth/AHWONJ5AIY4MILWYV4G7TT3Q5JV5TANCNFSM4D7GKG6Q


Need a better documentation - or at least, examples

There's no example for the "params in the config file" part and some settings (debugforce) differ from the usage example ($force).
Is there a precise order for the expire or token option in the function ?

Yes, please.

rejoice! i will do this today. :)

@jesuismaxime  the order is set here:
https://github.com/bnomei/kirby3-instagram/blob/master/classes/Instagram.php#L48
anything you wanted to do with the function that is not possible yet?

https://github.com/bnomei/kirby3-instagram/releases/tag/v1.1.0


Add already consensus and api versions

It's not too early to start keeping track of versions as we've discussed before.
const CONSENSUS_VERSION : (u32, u32) = (0, 0); // consensus version + api sub-version; TODO: Package in `struct` with some helpers maybe.
const DB_SCHEMA_VERSION : u32 = 0;

Introduce API call to get API version:
fn get_api_version(&self) -> (0, 0)

Start actually incrementing these versions as we land patches that break compatibility. It's OK this will be happening every day. It's not like we're going to run out of numbers, and it will get us used to the idea.
Compare these versions on the client side and refuse to work when they don't match.

This would be a great exercise to just prepare for our first stable public API. To start being aware of all the subtle little things that require version upgrades. Just because we start using version numbers doesn't mean we're committing to support them indefinitely. But I think it could help us get to that point sooner.

For API versions, where clients ignore new fields, we might want to use SemVer so certain updates are detectable by supporting clients but don't make old ones reject the new version? For consensus encoding this would be trickier, although adding a new module is kind of non-breaking from a client's PoV (just from the guardians'), so it might make sense there too.

@elsirion
I think the semver-like thing works, but please give it some thought at some point.
So it would be
CONSENSUS_VERSION, API_VERSION, API_REVISION
.
Both client and the server will have to maintain certain amount of backward compatibility, and negotiate the maximum common version they support.
On connecting, client would send: Vec<(CONSENSUS, API_VERSION, MIN_API_REVISION)>, and server would find the maximum common (CONSENSUS_VERSION, API_VERSION), where server has at least MIN_API_REVISION
Adding new APIs would only increment the MIN_API_REVISION.

See https://github.com/fedimint/fedimint/pull/1579

Did https://github.com/fedimint/fedimint/pull/1579 close this?

I'd keep this one open until we have actual compat checking on client side for api versions.

TODO from call:

[ ] Write module version to cfg
[ ] FM consensus version

[ ] Add function returning supported versions
[ ] Add to cfg

[ ] API version

[ ] Return from API endpoint for FM+each module
[ ] Also return consensus version, useful for parsing config

[ ] FM Code version: keep git hash for now

[ ] Do we need p2p version once removed?

I'm looking into server-client api version negotiation. Each peer has an endpoint returning supported api version for core + each module. But then should client find one common version for each core/module that works with all peers, or should picking the version to use happen per (guardian_id, core/module)?
Doing it per guardian would allow guardians greater flexibility w.r.t code upgrades, but then things like unifying responses from guardians will become much, much harder...
So I guess I'll do one api version that must work for all (or at least threshold) peers.

AFAIK everything has been implemented and we can create new issues for things we want to improve.


Print out key instead of value for runhouse status.

we want to print the key, not the values

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

Current dependencies on/for this PR:

main

PR #453

PR #457

PR #461
PR #458

PR #455

PR #462   👈

PR #454
PR #451

This stack of pull requests is managed by Graphite.

Merge activity

Feb 12, 4:55 PM EST: @rohinb2 started a stack merge that includes this pull request via Graphite.


Install Instructions Fail on Ubuntu 14.04.1

Following the docker installation instructions on a completely fresh 14.04.1 machine doesn't seem to work properly.
Adding the docker apt repo and installing seem to go fine, but the test run errors out:
$ sudo docker run -i -t ubuntu /bin/bash
Unable to find image 'ubuntu' locally
ubuntu:latest: The image you are pulling has been verified

511136ea3c5a: Pull complete
d497ad3926c8: Pull complete
ccb62158e970: Pull complete
e791be0477f2: Pull complete
3680052c0f5c: Pull complete
22093c35d77b: Pull complete
5506de2b643b: Pull complete
Status: Downloaded newer image for ubuntu:latest
permission denied2014/11/06 04:30:25 Error response from daemon: Cannot start container 815161de04b969ef2f6946b0a0dc5653d6163d199c3ddd85dd0efcb3f8f1f825: permission denied
$

Env info:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.1 LTS
Release:	14.04
Codename:	trusty
$ docker --version
Docker version 1.3.1, build 4e9bbfa

Same permission problem here.
Ubuntu 14.04 LTS
curl -sSL https://get.docker.com/ubuntu/ | sudo sh


Automatically assign MY-ORG/my-team as reviewer for created PR

Is there an existing issue for this?

[X] I have searched the existing issues

Package ecosystem
Docker
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
No response
dependabot.yml content
version: 2
registries:
github-git:
type: git
url: https://github.com/
username: ${{ secrets.GH_USER }}
password: ${{ secrets.GH_TOKEN }}
updates:

package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 2
reviewers:

"MY-ORG/my-team" # Assign team to review the PR
pull-request-branch-name:
separator: "-"
commit-message:
prefix: "fix: " # Prefix all commit messages with "fix: "...
include: "scope" # ...and include scope of updates in them

package-ecosystem: "github-actions" # Process GitHub actions
directory: "/"
registries: "*"
schedule:
interval: "daily" # Check for updates to GitHub Actions every week
open-pull-requests-limit: 2
reviewers:

"MY-ORG/my-team" # Assign team to review the PR
pull-request-branch-name:
separator: "-"
commit-message:
prefix: "fix: " # Prefix all commit messages with "fix: " to bump test-docker version and test all actions...
include: "scope" # ...and include scope of updates in them

Updated dependency
No response
What you expected to see, versus what you actually saw
Dependabot errors silently and does not add any reviewers, with message/comment in PR:
Dependabot tried to add @MY-ORG/my-team as a reviewer to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/MY-ORG/test-docker/pulls/<PR number>/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the MY-ORG/test-docker repository. // See: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request

Per the documentation, provided team should have been added to PR's reviewers.

Of course we're not using MY-ORG/my-team, that's only cleaned for the ticket reporting. Actual ORG, team and project name have been altered both here and in dependabot.yml.

I tried with organisation/repo-owner in original, so in caps, I tried lowercased, both resulting in the same error as shown above. Did we miss something?
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
No response
Smallest manifest that reproduces the issue
No response

@mkarwin FYI, I saw the same thing at OpenNMS. It turns out that in our case the specific my-team I was trying to assign reviews to wasn't specifically added as a collaborator.  Once I added them it worked. (ex: this PR)
I added them with "write" access, but I wonder if "triage" level is enough. Perhaps this should be documented in more detail.


插件【JWT 认证】支持将解析后的数据放到请求中

Why do you need it?
Is your feature request related to a problem? Please describe in details
How could it be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
网关经过jwt解析后， 可以修改请求或者响应，比如将解析内容放入请求header或者body中，或者自定义响应内容
Other related information
Add any other context or screenshots about the feature request here.

可以使用这个配置

很棒👍，问题解决了！


cast failed_values keys to str

Coverage remained the same at ?% when pulling aa27d09093b8e359f73ebecec2b23ef1cea12502 on bugfix/failed-values-key-as-str into f91b46744aec94850bc19f996e1f760060f515ac on develop.


AmiGO footer information out of date

Hello,
The copyright an the data load information needs to be updated:

For the data: it would be nice to have the information :

ontology load date
annotation load date

Thanks, Pascale

While the data is fine, metadata parts of the pipeline need work and have been failing. All of this will be fixed as we flip to Berkeley production.
Dupe of #472


Add extension to extension page

This PR should include the extension in the extension page, where it can be loaded to scratch itself.

Closes #1

Closes #1


Rounding error in version 1.9 but not in 2.0 when converting to WKT

In version 1.9, saving a feature to a WKT gives a rounding error. Example:
var c = new Coordinate(481408.90381056763, 6624970.0);
IFeature f = new Feature(FeatureType.Point, new List<Coordinate>() {c});
var wkt = f.BasicGeometry.ToString();

results in truncatation of the 10th decimal:
wkt = "POINT<PHONE_NUMBER>105680000000 6624970.0000000000000000)"
The current trunk (upcoming 2.0) does not result in the same problem:
wkt = "POINT<PHONE_NUMBER>1056763 6624970)"
Is there a way to set the precision in 1.9?

I think the precision gets set with the help of the PrecisionModel that is used inside the GeometryFactory that is used to create your Geometry.
As far as I could tell without debuging the code there doesn't seem to be a difference. So your difference might comes from some code fixes that were added after the old NTS version that was used for DotSpatial.Topology.

I am not clear what you mean that there doesn't seem to be a difference? I get the rounding error when running nuget version 1.9.

The code I had a look at didn't seem to be different for 1.9 and 2.0. That's the reason I think changing the precisision might not result in what you want, because the error could be somewhere else.

Since issue is not reproduced in 2.0, then we can close it, is it?

Yes, we can close it, but I am away from office and a PC.
Mvh Peder

2 apr. 2017 kl. 09:28 skrev Max Miroshnikov<EMAIL_ADDRESS>Since issue is not reproduced in 2.0, then we can close it, is it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Fix typo in README.md

:+1: :fire: :fireworks: :star: :dizzy: :night_with_stars: :baby: :baby_bottle: :do_not_litter: :cherry_blossom: :mag_right:


use login type configuration from ICM instead of hard coded type 'email'

Is your feature request related to a problem? If yes, please describe it.
ICM provides two options for user registration with the email address or with a chosen username. Currently the PWA is prepared to handle both ways but by default the registration and login are hard coded to use email (see src\app\core\configurations\injection-keys.ts).
/**
 * If 'username' login name is used for registration, if 'email' the email is used as login name (default: 'email')
 */
export const USER_REGISTRATION_LOGIN_TYPE = new InjectionToken<string>('userRegistrationLoginType', {
  factory: () => 'email',
});

Describe the desired solution.
Currently the ICM configurations REST call does not provide the information which login type is configured in the ICM backoffice. As soon as this is fixed the PWA needs to be adapted to handle both ways dynamically in accordance with the ICM configuration.
The login with username is not fully supported by the pwa, yet. Only the login page is showing the username. The registration page, the profile pages and maybe some other components have to be adapted, too.
Provide additional context.
AB#71466 REST: Preference LoginType not provided by GET /configurations call
AB#71849

This is now available (at least in <IP_ADDRESS>) and can be implemented.

The REST-client (PWA) doesn't need to care about the preference "UserRegistrationLoginType" at login. Only for registration and update profile. The type can improve the UI. In case of "email" both fields "login" and "email" can be displayed as one.
The ICM uses the "login", always.


4.5.0 : ascli binary not found

bug in gemspec : binary files are not listed
workaround:
Check that ascli is found in the gem folder:
find $(gem env gemdir)/gems -name ascli

then, if it's found , execute this:
ln -s $(find $(gem env gemdir)/gems -name ascli) $(gem env gemdir)/bin

Any update on when this might be fixed? My CI workflows were failing, so I'm just currently using an old version by adding the version flag.
(Just a quick fix for your workflow scripts if you are here like me)-
Change this
gem install aspera-cli

to this
gem install aspera-cli -v 4.4.0

Just installs the old version where the binary is found, for now.

fixed in 4.6.0


portico: Hide the custom show password for MS browsers.

This commit creates the function "check_if_show_password_to_hide" that checks
the browser type if it is MS browser (IE, Edge, Chromium Edge) and hides the
password visibiltiy toggle.

CZO Link describing the problem in detail.
https://chat.zulip.org/#narrow/stream/101-design/topic/Show.20password/near/1173890
Testing plan:
From this website, I found the way to detect the browser type.
Have tested this PR on

[x] Chrome
[x] MS Edge Dev on Ubuntu (Testing this PR on this browser)
[x] Opera browser
[x] Brave browser
[x] Chromium browser
[x] Firefox browser
[ ] IE
[ ] Older Edge

I have tested on the type of browsers I have. If someone can check for other browser that are left in this list, it would be helpful.
GIFs or screenshots:
The screenshot from MS Edge browser.

Also I observe that the padding is a bit messed up, that can be fixed by simply creating a class. Currently we should first focus on, is it the right way to solve this issue?

Yes browser does that for every password field. Sure, I will add that in the setup_password_visibility_toggle function.

Updated the PR, adding the code in common.js

Closing this in favous of #18815


Add support for Spotify running in a Linux namespace

When running blockify without any arguments, I get:
Traceback (most recent call last):
  File "/usr/bin/blockify", line 11, in <module>
    load_entry_point('blockify==3.6.3', 'console_scripts', 'blockify')()
  File "/usr/lib/python3.6/site-packages/blockify/cli.py", line 605, in main
    cli.start()
  File "/usr/lib/python3.6/site-packages/blockify/cli.py", line 225, in start
    self.toggle_mute(2)
  File "/usr/lib/python3.6/site-packages/blockify/cli.py", line 376, in toggle_mute
    self.mutemethod(mode)
  File "/usr/lib/python3.6/site-packages/blockify/cli.py", line 459, in pulsesink_mute
    index, playback_state, muted_value = self.extract_pulse_sink_status(pacmd_out)
  File "/usr/lib/python3.6/site-packages/blockify/cli.py", line 444, in extract_pulse_sink_status
    pid = [k for k in idxd.keys() if k in self.spotify_pids][0]
IndexError: list index out of range

During the run:
idxd.keys() = [2]
self.spotify_pids = [30019, 30006, 29987, 29984]

So obviously, pid is empty and pid[0] is out of bounds, thus the IndexError.
I ran pacmd list-sink-inputs and noticed that application.process.id of Spotify is 2, not the PID of any Spotify-related process.
The problem is that pacmd list-sink-inputs reports the PID from the view of the respective process, Spotify in this case. Since Spotify is put into a separate namespace by flatpak, it reports PID 2, (PID 1 is of the namespace init process, see man 7 pid_namespaces). I don't know whether to consider this a bug in pulseaudio... but certainly, blockify must be PID namespace-aware and use global PIDs instead of namespace-specific ones.

I confirm this issue on my machine.


Oauth with NPE

Redirect not to kynetx, but to a localhost:8080 pico engine for oauth.

Ultimately we need to let people choose this. We haven't talked about discovery, so just a place to enter it in Manifold login would be OK for now. I'm envisioning a single field form that lets you put your pico engine URL in (with http://localhost:8080 as the default) and a button that says "Link".
That would take you to the Oauth API on the engine.

Ok. I'll make sure to add that feature along with this enhancement.

Pushed changes to authorize with localhost:8080 NPE server. Next step: add the Link button and only default to localhost:8080 if another option is not provided.

Link button has been added. Note: since version 0.12.6 of NPE, only the latest version of node works with authorization, not just version 4 and up as stated in the docs. This problem is being researched.


Write HYPRIOT_DEVICE and HYPRIOT_IMAGE_VERSION to /etc/os-release

For better versioning we should write some values to /etc/os-release
Example:
HYPRIOT_OS="HypriotOS/armhf"
HYPRIOT_OS_VERSION="v0.6.1"
HYPRIOT_DEVICE="Raspberry Pi"
HYPRIOT_IMAGE_VERSION="v0.1.1"

See also hypriot/os-rootfs#20

Fixed with https://github.com/hypriot/image-builder-rpi/commit/bc03ceff6d5376d3efb8788f213f35e25cbaf1b9


Fix "whitespace" words - docs/framework

Fix "whitespace" words - docs/framework
This PR came out from this issue. It's the third PR and it's all about docs/framework.
Brief explanation
We should use white-space for adjectives and white space for nouns.
Suggested Reviewers
@mairaw @rpetrusha @wstaelens

Done!


⚠ ClamAV has degraded performance

In bfb6ac6, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 199 ms

Resolved: ClamAV performance has improved in 1946e0e.