text:
Akka HTTP: Add option to extract arbitrary data from request and pass to handler

This PR allows the user to extract arbitrary data from an Akka HTTP request, and have it passed to the route handler. It's inspired by the tracing code, and could theoretically replace it entirely since it's a more general version of the same thing.
There are a few examples of where this would be helpful already. I had a look for relevant open issues:

@eli-jordan asking for this feature directly: https://github.com/twilio/guardrail/issues/381
Me, wanting to inject a Directive0: https://github.com/twilio/guardrail/issues/645. I realized later that while a Directive0 would be useful, I'm already extracting an Authorization header by means of a header parameter in the OpenAPI spec. This PR would solve both issues for me.
@edmondo1984 wants to access Authorization data in the handler: https://github.com/twilio/guardrail/issues/117
Providing a better place to inject the oauth directive discussed in https://github.com/twilio/guardrail/issues/90, so authorization can now be checked after path matching. Wondering if this would address @Stinger911's comment about it being "enough".
@willgu-gdm wants to extract the whole request, which would now be possible: https://github.com/twilio/guardrail/issues/616
@ssboisen could extract the body: https://github.com/twilio/guardrail/issues/552#issuecomment-634460237
@kimxogus would have a workaround for extracting cookies: https://github.com/twilio/guardrail/issues/298

Because of the composability of Akka Directives, you can really do a lot of different things with this! Some of those things may warrant a specific solution as well, but until those more specific solutions are developed, this may be a good escape hatch.
Notes:

Am very new to Scala Meta, so let me know if I did things strangely
I'm not very familiar with Http4s, so didn't want to go too far down the road of implementing it there. Plus, I think there's already some similar functionality with mapRoute there?
I chose to make this feature entirely optional, like tracing. But, I could also see it being always-on with a default no-op customExtract (again similar to mapRoute which has a no-op default, looks like). Am happy to make that happen if desired.
I did add one test, but can add more if needed.
I didn't look into adding the new option to any of the build plugins yet, but can do if this seems like a good idea

Thanks for having a look!
Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

[x] I acknowledge that all my contributions will be made under the project's license.

Codecov Report

Merging #747 into master will increase coverage by 0.04%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master     #747      +/-   ##
==========================================
+ Coverage   81.20%   81.24%   +0.04%
==========================================
  Files          78       78
  Lines        5197     5251      +54
  Branches      139      136       -3
==========================================
+ Hits         4220     4266      +46
- Misses        977      985       +8

Impacted Files
Coverage Δ

...il/generators/Scala/EndpointsServerGenerator.scala
0.00% <0.00%> (ø)

.../guardrail/protocol/terms/server/ServerTerms.scala
0.00% <0.00%> (ø)

...il/generators/Java/DropwizardServerGenerator.scala
96.29% <66.66%> (-1.73%)
:arrow_down:

...ail/generators/Java/SpringMvcServerGenerator.scala
90.67% <66.66%> (-1.22%)
:arrow_down:

...drail/generators/Scala/Http4sServerGenerator.scala
93.50% <66.66%> (-0.86%)
:arrow_down:

.../src/main/scala/com/twilio/guardrail/Context.scala
100.00% <100.00%> (ø)

...n/scala/com/twilio/guardrail/ServerGenerator.scala
100.00% <100.00%> (ø)

...ail/generators/Scala/AkkaHttpServerGenerator.scala
92.72% <100.00%> (+0.93%)
:arrow_up:

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 55447a0...4aa0c3d. Read the comment docs.

Thanks @kelnos! I can definitely write some docs. Seems like a new section on https://guardrail.dev/scala/akka-http/generating-a-server might be the best place for it? Probably a runtime test would help too.
Here's a short example of how it works with customExtraction = true, just extracting the whole Akka HttpRequest:
// Guardrail-generated code
trait UserHandler[E] {
  def createUser(respond: UserResource.CreateUserResponse.type)(body: definitions.User)(extracted: E): scala.concurrent.Future[UserResource.CreateUserResponse]
}

object UserResource {
  def routes[E](handler: UserHandler[E], customExtract: String => Directive1[E])(implicit mat: akka.stream.Materializer): Route = // .... for details see the test
}

// user-written code
class UserApi extends UserHandler[HttpRequest] {
  override def createUser(respond: UserResource.CreateUserResponse.type)(body: definitions.User)(req: HttpRequest): scala.concurrent.Future[UserResource.CreateUserResponse] = {
    println(s"here's the whole Akka request: $req")
    ???
  }
}

val extractReq = (operationId: String) => extractRequest // Directive from Akka HTTP

val userRoutes = UserResource.routes(new UserApi, extractReq)

val binding = Http().bindAndHandle(userRoutes, "localhost", 1234).futureValue

I didn't compile this, but you get the idea hopefully. And am realizing the handler should be contravariant, so that you could extract a subclass of what the handler expects. Will change that as well.

Oh wow, that's really cool.  Is there a way to extract multiple things?  Like say I wanted to provide a custom extractor that composes two akka-http directives, and ends up returning a Directive2?
Yes, generating-a-server is probably a good place for docs.
I'm not sure overall about the proposed mechanism for enabling/disabling this; would like @blast-hardcheese to weigh in on that.

Is there a way to extract multiple things?

You could do this by extracting a tuple. Akka already using this mechanism internally (there's no such thing as a Directive2, only Directive1[Tuple2[A, B]]. They do a bit of magic to make the extraction nicer, see https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/index.html#automatic-tuple-extraction-flattening-.
We don't have any magic to make the handler flatten the tuple into separate params, but I think that's OK.

I'm not sure overall about the proposed mechanism for enabling/disabling this

I'm not sure either. It's not a thing that everyone will use, certainly, and it does add a bit of noise to the generated handler trait if you're not using it. Hence the initial thought of making it optional via the build plugin. But, definitely open to other ideas.

OK, I rebased on latest master, made the handler contravariant, cleaned up the type param declaration, and added some docs.
I looked at adding a runtime test, but it looks like that might require getting further into how this feature will be enabled, so held off for now.

Just FYI we are awaiting this with great anticipation :)
Anything we can do to get this moving? We need it for supporting POST of application/zip

@anagrius Hey, very sorry to keep you all waiting on this! It has been on my list, but I recognize that it has taken some time.
I've blocked off some time on my calendar to review the open question here; if I don't have an answer for you tomorrow, I'll at least provide an update around where I got.
Thank you for your contribution so far!

I'm not very familiar with Http4s [...] I think there's already some similar functionality with mapRoute there?
This is actually a good call-out; mapRoute may warrant being added to akka-http as well, in the form of (String, HttpRequest, Future[HttpResponse]) => Future[HttpResponse], though anything that could be done with that would be possible via customExtraction, so this is more of a call-out in case others recognize the need for their use case.

I chose to make this feature entirely optional [but] I could also see it being always-on with a default no-op [...].
I used a strategy sort of like this to control when the user desired hashing file upload contents in-flight:

        val Unmarshalfile2Part = handler.uploadFileUnmarshalToFile[Option](None, handler.uploadFileMapFileField(_, _, _))...
        val Unmarshalfile3Part = handler.uploadFileUnmarshalToFile[Id]("SHA-256", handler.uploadFileMapFileField(_, _, _))...

which removed the possibility of losing the desired hashing strategy ("SHA-256") along the way and ending up with a None.get. Under the hood this uses Functor[Option] and Functor[Id] to do the work, which could be employed here as well to have this sort of "enabled by default but stubbed out" behaviour, kind of like:
def addPet(respond: PetResource.AddPetResponse.type)(): Unit => scala.concurrent.Future[PetResource.AddPetResponse]
def addPet(respond: PetResource.AddPetResponse.type)(): RemoteAddress => scala.concurrent.Future[PetResource.AddPetResponse]

or something, but to the best of my knowledge there's no way to implement this without burdening the user with additional syntactic noise.
To that end, I think enabling it via simple CLI flag and options in the build tooling makes the most sense, at the expense of broadening the different varieties of generated Handler interfaces, increasing the cognitive burden when configuring the plugin.

also rebased to resolve merge conflicts

also addressed some build warts from the recent Scala Dropwizard addition.

To that end, I think enabling it via simple CLI flag and options in the build tooling makes the most sense, at the expense of broadening the different varieties of generated Handler interfaces, increasing the cognitive burden when configuring the plugin.

Agreed, thanks for plumbing that all the way through.

Sounds good, and thanks!
On Mon., Sep. 7, 2020, 10:49 Devon Stewart, notifications@github.com
wrote:

@blast-hardcheese commented on this pull request.
In modules/microsite/docs/scala/akka-http/generating-a-server.md
https://github.com/twilio/guardrail/pull/747#discussion_r484475675:

For example, to extract an X-User-Id header value from an incoming request, your code might look like this:
-class UserApi extends UserHandler[String] {
-  override def createUser(respond: UserResource.CreateUserResponse.type)(body: definitions.User)(userIdHeader: String): scala.concurrent.Future[UserResource.CreateUserResponse] = {
-    println(s"The supplied X-User-Id header is: $userIdHeader")
+class UserApi extends UserHandler[Tuple1[String]] {
+  override def createUser(respond: UserResource.CreateUserResponse.type)(body: definitions.User)(extracted: Tuple1[String]): scala.concurrent.Future[UserResource.CreateUserResponse] = {
+    println(s"The supplied X-User-Id header is: ${extracted._1}")

I'll revert back to your previous strategy, merge, and release.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/twilio/guardrail/pull/747#discussion_r484475675>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHHKSVBWST3HOH34HTCDHTSETXHJANCNFSM4PY7EHUA>
.

Tried this out today in our codebase, and it's working nicely! Thanks again for getting it merged.

Great to hear, and thank you for both your contribution and patience through the process! If you're comfortable being listed on our Adopters list, would you mind opening a PR for that?

@blast-hardcheese I would very much like to, but will have to decline for now. If anything changes I'll open up a PR.

Not a problem, thank you again for the contribution 🙂

authors: DWvanGeest anagrius blast-hardcheese codecov-commenter kelnos

repo: twilio/guardrail


text:
Video Quality isnt great despite using 1080p camera.

Hello,
Has anyone noticed the video quality isn't that great when you're looking at other participants cameras? Only the video seems to stutter when they move.
I'm using npm start so im not using the production build, but is that really the issue? Seems server sided. How could I troubleshoot this?

Thanks for the issue @Nicholashuber!
It doesn't matter if you run npm start or if you create a production build - it won't have any effect on video quality.
Video quality can be affected by any number of issues, including network quality, available bandwidth, or server issues.
We can try to diagnose quality issues for you. The next time you are seeing problems, grab the Room SID from the browser console (when you are connected to a Room, you can look at the window.twilioRoom.sid variable) and share it with us. We'll be able to check out the Room logs for clues.

I seem to have the same problem with video quality. I just looks very grainy.
Happens both when testing on my laptop and phone.
Example sid: RMd5a78189d26692d96c46cc01a5844490 (I have several more logged)

source: gharchive/issue

authors: Nicholashuber andresdsep timmydoza

repo: twilio/twilio-video-app-react

license_type: permissive

license_source: github-api


text:
Sending pdf to my kindle email after running the command and this Error: connect ECONNREFUSED 127.0.0.1:465 occured

@twindle-co/developer Error message should be improved!

This can be related to #717

The issue has been resolved, for anyone wanting to yahoo mail in sending the twitter thread to kindle app
HOST=smtp.mail.yahoo.com
PORT=465
EMAIL=
PASS=(this will not be the original password to your email but rather the password generated from the Generate app password option under account security in your account info section). In generating the password you select other app in the list of options and give a name to the third party and then generate the password. Make sure you save this password because you will be using it anytime you want to send twitter threads to your kindle app.
Also make you sure you whitelist the email address that you want to receive files from.

Excellent @EYRAM565

@EYRAM565 could you try seeing if the error message is coming correctly for you now? If yes, can close this

yes it is .

thanks @proful

authors: EYRAM565 arthurbuhl johnjacobkenny proful

repo: twindle-co/twindle

license: MIT


text:
DefaultSmppClient#destroy NPE in netty4 branch

Run com.cloudhopper.smpp.demo.ClientMain without a server:
2015-04-13 17:04:21,110 [nioEventLoopGroup-2-1] TRACE c.c.s.c.SmppClientConnector - channelRegistered
2015-04-13 17:04:21,110 [main] DEBUG c.c.smpp.impl.DefaultSmppClient - Waiting for client connection to /127.0.0.1:2776
2015-04-13 17:04:22,116 [nioEventLoopGroup-2-1] TRACE c.c.s.c.SmppClientConnector - channelUnregistered
2015-04-13 17:04:22,119 [main] WARN  c.c.smpp.impl.DefaultSmppClient - Client did not connect.
java.net.ConnectException: Connection refused: no further information: /127.0.0.1:2776
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_72]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_72]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_72]
2015-04-13 17:04:22,120 [main] ERROR c.c.smpp.demo.ClientMain -
com.cloudhopper.smpp.type.SmppChannelConnectException: Unable to connect to host [127.0.0.1] and port [2776]: Connection refused: no further information: /127.0.0.1:2776
	at com.cloudhopper.smpp.impl.DefaultSmppClient.createConnectedChannel(DefaultSmppClient.java:321) ~[classes/:na]
	at com.cloudhopper.smpp.impl.DefaultSmppClient.doOpen(DefaultSmppClient.java:232) ~[classes/:na]
	at com.cloudhopper.smpp.impl.DefaultSmppClient.bind(DefaultSmppClient.java:201) ~[classes/:na]
	at com.cloudhopper.smpp.demo.ClientMain.main(ClientMain.java:110) ~[test-classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) [idea_rt.jar:na]
Caused by: java.net.ConnectException: Connection refused: no further information: /127.0.0.1:2776
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_72]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_72]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) ~[netty-all-4.0.25.Final.jar:4.0.25.Final]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_72]
2015-04-13 17:04:22,121 [main] INFO  c.c.smpp.demo.ClientMain - Shutting down client bootstrap and executors...
Exception in thread "main" java.lang.NullPointerException
	at com.cloudhopper.smpp.impl.DefaultSmppClient.destroy(DefaultSmppClient.java:153)
	at com.cloudhopper.smpp.demo.ClientMain.main(ClientMain.java:183)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

That's a nice find.  Do you think you would have time to submit a fix and PR?

authors: jjlauer krasa

repo: twitter/cloudhopper-smpp

license_source: bigquery


text:
Handle proto3 architecture mismatch in pplan_helper.py

with the move to proto3 for python , we run the rick of mismatch between architecture specific proto3 or architecture neutral proto3 payloads , we need to handle mismatch more gracefully and try to enforce native proto3
  def _get_my_spout_or_bolt(self, topology):
    my_spbl = None
    for spbl in list(topology.spouts) + list(topology.bolts):
      if spbl.comp.name == self.my_component_name:
        if my_spbl is not None:
          raise RuntimeError("Duplicate my component found")
        my_spbl = spbl

    if isinstance(my_spbl, topology_pb2.Spout):
      is_spout = True
    elif isinstance(my_spbl, topology_pb2.Bolt):
      is_spout = False
    else:
      raise RuntimeError("My component neither spout nor bolt")
    return my_spbl, is_spout

for reference
https://github.com/google/protobuf/issues/539

this is resolved in the interim by
https://github.com/twitter/heron/pull/2397

repo: twitter/heron


text:
Update homepage link...

Update the link to point to itself instead of to the logging service.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

source: gharchive/pull-request

authors: CLAassistant hawflakes

repo: twitter/ios-twitter-image-pipeline


text:
Added another try/catch for tree.toCSS

Added another try/catch for tree.toCSS because parse errors were not captured by parent try/catch.
I'm not sure when or even if less.Parser(options).parse throws errors.
Also updated the way errors are logged; replaced custom error parser with less.formatError

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

We are no longer maintaining this project and as such are archiving all PRs.

authors: CLAassistant grimreaper koenpunt

repo: twitter/recess


text:
3 bugs

1 if you are in the heigh nivel you are invisible.
2 if you aren't op you wasn't place blocks map (deepwind jungle)
3 if you put in the bedrok a block you can put to the top (this bug is allready know and fixed) but is a dupe idk.
Latest version

I think you need provide evidence of this bugs, also, the first bug is relationated with 1.8, not the plugin.

I dont in pc to provide

Can you do /cardinal -v and tell us the version that it occurs in?

Can't confirm

in server.propieties set spawn-protection=0
can confirm

Can't fix
Disable server spawn protection
If it is fixed why are you reporting it?

Isnt fixed

repo: twizmwazin/CardinalPGM

license: mit


text:
Compact Range in pybind11 branch

My use case is the following: create a RocksDB index as a batch process, then let multiple processes open it as read-only and use the index repeatedly.
It is a rather basic use case, but I am currently unable to implement it in the latest python-rocksdb master release because there is no reliable way to close a DB (see #58) and not all data is written to disk when the index creation is done.
Following the advice from #58, I ported this section of my code to the pybind11 branch. Now, this is far from ideal, I assume pybind11 to be rather unstable and many features are missing, but at least DB closing works.
However, I would like the index to be fast for read-only reads. As far as I understand, compaction can't happen in read-only mode and closing a DB doesn't necessarily force compaction. So, if the DB is not compacted during creation, it will be relatively slow for reads. And since such few options are exposed in the API, I am also unable to make background compaction more aggressive.
So, in essence, I would be very grateful if compact_range were exposed to the API in pybind11.
Please let me know if you have any alternative suggestions that might help me in my use case.

So you need compact range API for doing this?

Ah, good, thanks. It wasn't documented in the docs.

yup
it's not documented yet. I will update the document as soon as possible.

By the way, feel free to open any feature request on issue list since it's hard to export all of apis of rocksdb. But it's much more easily to export only the popular APIs.

authors: oersted twmht

repo: twmht/python-rocksdb


text:
Feature Request: Local User Account Picker

I'd like to request a feature at the login screen (similar to JConnect) that lets the user pick which user account to have xcreds manage. We use google workspace and we are not able to create custom claims like you can in azure so we have no way to map a local user account to a google workspace user when the local user account does not match first initial, last name format (eg. JSmith). We would LOVE this feature as currently its a blocker to being able to roll this out company-wide as we have about 100 machines that don't match the naming convention. (We would gladly pay for paid support if we could expedite this feature as well!)

This would be awesome! literally the only thing holding me back from deployment.

dup of #98 . added.

authors: dalonfoley ntauthy twocanoes

repo: twocanoes/xcreds


text:
linux version does not start

$ beaker/beaker
(electron) companyName is now a required option to crashReporter.start
Using port 32326 for main thread IPC

then nothing happens

this happened because by mistake i had downloaded a 32-bit JRE.

repo: twosigma/beaker-notebook


text:
SQL plugin improvements

added custom error on unfound beaker objects
improved canceling of sql queries

i'm not seeing the custom error

also, please remember, one change in each pull request.

in this case we have to merge code with the branch:
#2524 sql should not require %%inputs %%outputs
or test it on following SQL:
%%inputs: idx
select * from color where id = ${idx}
It should be seems on:

authors: max-lavrik scottdraves


text:
Kotlin kernel doesn't work

Gives the following errors/warnings:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.twosigma.beakerx.kotlin.evaluator.ReplWithClassLoaderFactory (file:/Users/ghalib.bello/miniconda3/envs/beakerx/lib/python3.5/site-packages/beakerx/kernel/kotlin/lib/kotlin.jar) to field java.lang.ClassLoader.parent
WARNING: Please consider reporting this to the maintainers of com.twosigma.beakerx.kotlin.evaluator.ReplWithClassLoaderFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 10888 out of bounds for length 10888
at org.jetbrains.org.objectweb.asm.ClassReader.readUnsignedShort(ClassReader.java:2464)
at org.jetbrains.org.objectweb.asm.ClassReader.readUTF8(ClassReader.java:2525)
at org.jetbrains.org.objectweb.asm.ClassReader.readModule(ClassReader.java:761)
at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:646)
at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:507)
at org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo$Companion.read(JavaModuleInfo.kt:67)
at org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder.findSystemModule(CliJavaModuleFinder.kt:44)
at org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder.access$findSystemModule(CliJavaModuleFinder.kt:25)
at org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder$systemModules$1.invoke(CliJavaModuleFinder.kt:37)
at org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder$systemModules$1.invoke(CliJavaModuleFinder.kt:25)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:149)
at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:109)
at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:133)
at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:254)
at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:241)
at kotlin.sequences.SequencesKt___SequencesKt.none(_Sequences.kt:1266)

Kotlin kernel works only on Java 8. There are multiple issues about that already. There is new kernel provided by JetBrains, which fixes it. Let me write a separate issue about it.

repo: twosigma/beakerx


text:
SourceCodeTextEditor  - SwiftUI wrapper for SyntaxTextView

I've made a SourceCodeTextEditor (to follow the naming of the new TextEditor view).
I think it is pretty self-explanatory. You can  customise on creation but it has defaults that make it work out of the box.
// text storage
@State private var text = ""
...
var body: some View {
...
  SourceCodeTextEditor(text: $text)
...
}

text onChanged will not update view for nothing doing in func updateUIView(_ uiView: SyntaxTextView, context: Context).

Can we get this merged? ❤

Yep! Thanks for the nudge 👍

authors: SebastianSzturo andreweades hstdt twostraws

repo: twostraws/Sourceful


text:
Default Symbols

None breaking change - all existing code will continue to work as normal, however apps that import Vortex, and previews within Vortex, can now call VortexView without specifying a closure for the symbols to be used. A default set of three 16x16 symbol images will automatically be made available; circle, confetti, and sparkle.  To see a code example, check the revised Snow preset preview.

This makes much more sense in isolation – thank you!

repo: twostraws/Vortex


text:
Autocorrect lint errors where possible

Add the --fix flag to the SwiftLint script to fix errors where possible. This commit also clears up the errors in the test file

Nice! Thank you 👍

authors: Abizern twostraws

repo: twostraws/simple-swiftui


text:
Support for Sanchonet

Is it possible to somehow connect Oura to Sanchonet? Maybe as a custom network?

Does Oura would support the Conway era?

This seems like functioning for now.
[source]
type = "N2N"
address = ["Tcp", "sanchonet-node.world.dev.cardano.org:30004"]
magic = 4
[sink]
type = "Stdout"
format = "JSONL"
throttle_min_span_millis = 500
wrap = true
[source.mapper]
include_block_cbor = false
include_block_end_events = false
include_transaction_details = true
include_transaction_end_events = false
include_byron_ebb = false
[chain]
byron_epoch_length  = 432000
byron_slot_length = 20
byron_known_slot = 0
byron_known_hash = "785eb88427e136378a15b0a152a8bfbeec7a611529ccda29c43a1e60ffb48eaa"
byron_known_time = 1686789000
shelley_epoch_length = 432000
shelley_slot_length = 20
shelley_known_slot = 0
shelley_known_hash = "6a7d97aae2a65ca790fd14802808b7fce00a3362bd7b21c4ed4ccb4296783b98"
shelley_known_time = 1686789020
address_hrp = "addr_test"
adahandle_policy = "8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3"

It just died for us.

It looks like there has been changes to the CBOR specification on sanchonet which Oura does not yet support. Is this in your pipeline?

@pedromtcosta @crypto-titan the networking stack should work but as previously mentioned, sanchonet uses ledger primitives from the upcoming Conway era which are still under development (coming soon). The changes need to occur on Pallas side first. Once Pallas is ready, Oura can update dependencies and start consuming Conway blocks.

authors: crypto-titan pedromtcosta scarmuega

repo: txpipe/oura


text:
Added Docker Image worflow and update other workflow

Checklist

[X] I have read the Contributing Guidelines
[X] I acknowledge that any submitted code will be licensed under the ISC License
[X] I confirm that submitted code is my own work
[X] I have tested the code, and confirm that it works

Enviroment

Operating System: null
Node version: 20
npm version: 10

Description

Added Github workflow to build a Docker Image and automatically push it on Docker Hub
Upgraded the Github action version and in prevision make everything working for the new LTS of NodeJS 20
The Github workflow ASS CI build and test the build ASS then makes a Docker Image of it, and after this push it to Docker Hub, when all of the previous stuff is done, it can send Discord notification everything is ready or not.
This would help a lot of people on deploying ASS on Portainer instance or just with Docker Compose, automated everything and maybe if you want it, you can add cypress or eslint or both to the repository so I can make a workflow for testing code.

LGTM !

All looks good! Just going to set up Secrets stuff prior to merge

authors: Gauvino tycrek

repo: tycrek/ass

license: ISC


text:
sdk-trace: add SpanExporter

Reference
Link

Spec
https://opentelemetry.io/docs/specs/otel/trace/sdk/#span-exporter

Java implementation
SpanExporter.java

1) The exporter MUST support three functions: Export, Shutdown, and ForceFlush.
Well, Export and ForceFlush are obvious. Shutdown, however, is more tricky.
Since the CE offers flexible lifecycle management of resources, I see two options:

Each SpanExporter  should manage its lifecycle on its own:

def otlpHttpExporter: Resource[F, SpanExporter[F]] = ???
def otlpGrpcExporter: Resource[F, SpanExporter[F]] = ???

val exporter: Resource[F, SpanEporter[F]] =
  for {
    otlpHttp <- otlpHttpExporter
    otlpGrpc <- otlpGrpcExporter
  } yield SpanExporter.of(otlpHttp, otlpGrpc)

We make SpanExporter.of return a Resource[F, SpanExporter[F]] and the given exporters will be shutdown there:

def of[F[_]](exporters: SpanExporter[F]): Resource[F, SpanExporter[F]] =
  Resource.make(...)(_ => exporters.traverse_(_.shutdown))

The same exporter will likely be shut down several times: by SpanExporter.of and by the exporter's lifecycle management (assuming the allocation of an exporter is defined as a Resource).
If we choose option 1, should we define a def shutdown: F[Unit] in the SpanExporter interface? This situation is similar to what we've discussed with April before https://github.com/typelevel/otel4s/issues/347.
2) export must return the ExportResult
Java SDK somewhat cheats here and returns CompletableResultCode. Which we can mimic as exporter.exportSpan(...).attempt.

[!NOTE]
Returns: ExportResult:
The return of Export() is implementation specific. In what is idiomatic for the language the Exporter must send an > ExportResult to the Processor. ExportResult has values of either Success or Failure:

Success - The batch has been successfully exported. For protocol exporters this typically means that the data is sent over > the wire and delivered to the destination server.
Failure - exporting failed. The batch must be dropped. For example, this can happen when the batch contains bad data and > cannot be serialized.

We can always define it as an ADT:
sealed trait ExportResult
object ExportResult {
  case object Success extends ExportResult
  case class Failure(reason: String) extends ExportResult
}

So far so good, but if we use a Multi exporter, we need to combine results for different exporters and distinguish one from another.
sealed trait ExportResult
object ExportResult {
  case class ByExporter(exporter: String, result: ExportResult)

  case object Success extends ExportResult
  case class Failure(reason: String) extends ExportResult
  case class Compound(results: NonEmptyList[ByExporter]) extends ExportResult

  implicit val compoundSemigroup: Semigroup[Compound] =
    (x, y) => Compound(x.results.concatNel(y.results))
}

def exportSpans(span: List[SpanData]): F[ExportResult] =
  exporters.reduceMapM { exporter =>
    for {
      result <- exporter.exportSpans(span)
    } yield ExportResult.Compound(NonEmptyList.one(ByExporter(exporter.toString, result)))
  }

In most cases, you are going to use one exporter. So is it worth the hustle?

I figured out that I made the review process complicated with the force-pushes. I should squash commits when we are done.
Sorry for that 😬

I added a composite failure:
https://github.com/typelevel/otel4s/pull/373/files#diff-446dd47f23242e790aae05d7c55f011715b8fc49cdfc71444cbd2c7c0965c035R130-R150
And the error management:
https://github.com/typelevel/otel4s/pull/373/files#diff-446dd47f23242e790aae05d7c55f011715b8fc49cdfc71444cbd2c7c0965c035R168-R198


text:
Add -Wnonunit-statement

Added in 2.13.9: https://github.com/scala/scala/pull/9893

Would be great to get this in @DavidGregory084

This is great, thanks @keirlawson!

authors: DavidGregory084 keirlawson sideeffffect

repo: typelevel/sbt-tpolecat


text:
knowledge-key:1.0.1

I am submitting

[ ] a new package
[x] an update for a package

paper property of page is now adjustable
@j6k4m8

My motivation to fix the new depricatons is currently limited. Maybe I will get to it sometime in the future. (Or someone else has the energy).
I hope this is okay for now.

Yes, we can still merge it like that. Thank you for the update :)

authors: elegaanz ngoetti

repo: typst/packages


text:
Primes in sub- and superscript are too eager.

Description
The following markup $a_(1)'$ produces the very unexpected result of keeping both the parentheses and the prime inside the subscript, rather than what I would've expected which would be placing the prime outside the subscript.
Current behaviour:

There is definitely a discussion to be had regarding whether the prime should be connected to the a, or be 'floating', placed horizontally after the subscript; we already have syntax to achieve either with a'_1 or a_1 ', respectively.
A slightly different, but related issue is a_', producing the rather curious output of:

I don't know what this should result in, perhaps even a syntax error.
Operating system
Web app
Typst version

[x] I am using the latest version of Typst

We had that discussion in my PR (https://github.com/typst/typst/pull/1614), it wasn't an easy one. After all, we decided to deviate from LaTeX behaviour to make the writing more compact. So the order you write things now matters. To attach prime to the main part, you have to write it near it. That makes souce code to be easier to read and closer to the output.
Primes don't remove brackets, because if you want to write something complex without them, you can use $a_(something strange')$ that will wield the same result. Usually if you write these parentheses, you want them, so Typst doesn't remove them.
And $a_'$ is definitely a bug to be fixed, thanks. Currently you can bypass it using $a_(')$.

authors: emilyyyylime sitandr

repo: typst/typst


text:
Added calc.signum, float.is-nan, and float.is-infinite

Closes #3113
I went for the first approach suggested @PgBiel of specializing calc.sign to work differently whether it's a float or an integer. This can of course be trivially changed.

I guess one problem of always returning integer, instead of returning a float when a float is given, is that we can't return NaN when NaN is given...
Maybe we could follow Rust fully and return a float when given a float (including NaN when given NaN)?
Although NaN is honestly a huge pain to work with in Typst, so I'm not sure if such behavior would be desired... (though, to get here you'd need a NaN in the first place anyway :p)

Based on the discussion in https://github.com/typst/typst/issues/3113, I think it'd be preferrable to return int for int and float for float. Moreover, I wonder why the name changed from signum in the issue to sign here. Which one is more common in other programming languages? Maybe there is some relevant previous discussion about naming in Rust's issues.

Based on the discussion in #3113, I think it'd be preferrable to return int for int and float for float. Moreover, I wonder why the name changed from signum in the issue to sign here. Which one is more common in other programming languages? Maybe there is some relevant previous discussion about naming in Rust's issues.

I have renamed it to signum, although I generally prefer sign but I'm not a attached to either one specifically. I have also adjusted the behavior to match exactly rust's. Because of this I also added a is-nan method to float to let the user check for nans, maybe that could be replaced by returning 0.0 for a nan, idk

I have renamed it to signum, although I generally prefer sign but I'm not a attached to either one specifically.

I'm also not attached to either one. I just wanted to raise attention to the fact that it changed.

@PgBiel also requested on Discord whether float.is-infinite() could be added so I included it in this PR, it feels like it fits, it's more improvements of floats than anything else.

I wonder whether we should add signum to calc for the time being or already start here with opting for methods...

I wonder whether we should add signum to calc for the time being or already start here with opting for methods...

I was thinking about this too... Maybe we can just straight up avoid the inevitable breaking changes.
Although it might seem inconsistent to users... but we can just explain what we're doing in calc's docs.

Thanks!

authors: Dherse PgBiel laurmaedje


text:
Update README.rst

Add "Annotation visualization"

👍

repo: tzutalin/labelImg


text:
Update to Mugen Souls Z

Hi.
You can update your tools to support Mugen Souls Z game, the file structure have just some little differences:
struct HeaderFooter
{
       char magic[4]; // GBNB (B=Big Endian)
       uint16_t field_04; // always 1
       uint16_t field_06; // always 0
       uint32_t field_08; // always 16
       uint32_t field_0c; // always 4
       uint32_t flags;
       uint32_t struct_offset;
       uint32_t struct_count;
       uint32_t struct_size;
       uint32_t types_count;
      uint32_t types_offset;
      uint32_t Entries_Count; // Text Count
      uint32_t string_offset;
      uint32_t field_30; // 0 or 4
      uint32_t padding[3]; // always 0
};
sizeof(HeaderFooter) == 0x40

Hmm, it looks like it's big endian, then it's related to #6, partially fixed it a70677d but I don't like that solution too much. Do you have some sample files?

Here: https://www56.zippyshare.com/v/IkMIekZ8/file.html

I've updated the ljx branch. I think I'll merge the cl3 changes from master, and then deprecate the whole old master and make ljx the new master, that's the way forward.

license: WTFPL


text:
Unable to instantiate application app.DebugApplication: java.lang.ClassNotFoundException

I've used this tutorial: http://littlerobots.nl/blog/stetho-for-android-debug-builds-only/ to use Stetho in debug build only.
I have 2 custom classes which extended Application:
public class SecondCustomApplication extends FirstCustomApplication {

And
public class FirstCustomApplication extends MultiDexApplication {

Now the Debug class:
public class DebugApplication extends SecondCustomApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
                        .build());
    }
}

And in main AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.package.name">

<application
        android:name=".SecondCustomApplication"
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="icon,label,name">

And in debug AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.package.name">

    <application
        android:name="DebugApplication"
        tools:replace="name" />

</manifest>

But when I run the App, I get this error:

com.package.name E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.package.name, PID: 14078
java.lang.RuntimeException: Unable to instantiate application com.package.name.DebugApplication: java.lang.ClassNotFoundException: Didn't find class "com.package.name.DebugApplication" on path: DexPathList[[zip file "/data/app/com.package.name-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.package.name-1, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
...
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.package.name.DebugApplication" on path: DexPathList[[zip file "/data/app/com.package.name-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.package.name-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)

I think this is because your class "DebugApplication" isn't on the main directory and in your debug Manifest you should use  android:name="**.**DebugApplication"
The only thing wich you need in your debug directory is your debug Manifest.

I have the same problem.

Add
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
to your App build.gradle file.
Call below method on your CustomApplication's onCreate method:

private void initStetho() {
        if (BuildConfig.DEBUG) {
            Stetho.initialize(
                    Stetho.newInitializerBuilder(this)
                            .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                            .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
                            .build()
            );
        }
    }

Add this builder.addNetworkInterceptor(new StethoInterceptor()); to the OkHttpClient.Builder instance.

authors: Drjacky KostyaBakay lmarquesmoreira

repo: uPhyca/stetho-realm


text:
Fixes to support uproxy-lib 28 and release of v0.8.14

This fix updates to uproxy-lib 28, as requested by @trevj for uproxy 8.14. This change updates the nat-probe code to use the updated freedom interface that handles bind errors as failed promises rather than return values. (See: https://github.com/freedomjs/freedom-for-firefox/pull/71/files)
TESTED:

grunt everything
NOTE:  integration test failed. @dborkan do we need to fix integration tests?
Manually tested: Chrome-Chrome, Chrome-Firefox, Firefox-Firefox

Assuming the change in uproxy-lib is that socket.bind will reject the promise instead of returning a posix-style error code, :thumbsup:

Reviewed 3 of 3 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.

Comments from the review on Reviewable.io

Apologies, I hadn't realised there were additional breaking API changes in uproxy-lib v28.
It looks like this pull request is basically these two pull requests:

https://github.com/uProxy/uproxy/pull/1726
https://github.com/uProxy/uproxy/pull/1702

The latter pull request has been open for some time; I think we can do better at clearing this backlog.
@iislucas many thanks for pushing through an updated freedom-for-firefox.

@trevj Yes, that's more or less correct, but the changes are dependent, and a few things were missing in #1702 , this PR has all needed changes and updates the version at the same time as the changes needed for it to compile/typecheck.
@jpevarnek Yes: the API change is to moving to use rejected promises instead of return values.

@dborkan OK, I've tested from a fresh dev cut, and see that integration tests are broken. So this isn't breaking them. I've created a separate issue (https://github.com/uProxy/uproxy/issues/1733) to look at the integration tests, but will merge this to avoid slowing things down.

(Shippable and travis are timing out due to failing to merge from git... I don't understand why, maybe something broken in git? I ran and tested locally.)

(@iislucas I cannot find the logs for the failure, any chance you have a link I could look at?)

I don't think you'll learn a lot: https://app.shippable.com/builds/55a3d4cba4a0be0e007c6492
(I'd pass on it for now)

authors: iislucas jpevarnek trevj

repo: uProxy/uproxy


text:
ui improvements

I'd like to land another improvement or two on this (such as making Cloud first in the list of network options (as spec'd here)), but didn't want to wait any more time before opening this PR in case it's worth merging already:

Language chooser dropdown now correctly displays currently-selected language (fixes #2405)
No longer reload the page when the language hasn't changed
Cloud is now an option along with the other networks in the list, rather than set apart in a big rectangular banner above that made users think it was an ad for DigitalOcean.
Combine the two redundant "Create account" / "I have an account" screens into a single new screen.
Implement more of the latest visual design and copy specs.

Also ditched "Loading uProxy friends" screen:
Was being displayed unconditionally for 5 seconds, even when it shouldn't have
(e.g. it's the first time the user is running uProxy and they don't yet have
any friends to load, or the user is not currently signed into any networks so
there's actually no loading activity going on, etc).
This is extra problematic because the "Loading uProxy friends" screen covers
up the + button. So every time a user opened uProxy with the goal of adding a
friend (remembering they might not yet even be signed into any networks),
they'd first have to sit through a 5-second "loading" screen (that possibly
advertised background activity that wasn't even really happening and) that was
only getting in the way of accomplishing the goal.
It looks like this used to make more sense (e.g. in 99cf70d), but the contacts
logic changed multiple times since then, and the soundness of the UI logic
didn't keep pace. Seems strictly better to remove the current, problematic
"loading friends" UI for now, and just have contacts appear once they're
loaded. A more sound "loading friends" UI can be added back in a follow-up
change if deemed necessary by proper design review.
Closes #2417
Closes #2418

This change is

Here are some screenshots:

Also we actually show "English" now when English is selected:

Just took a first pass at the new "empty roster" screen @ohnocassio spec'ed here:

Wasn't immediately obvious how to get it to cover up the get/share-access tabs (seems like it's trapped inside a shadow DOM that starts below the tabs). Anyone?

Looking great! I updated the empty roster graphic, so the final size should be 170px wide x 152px high. If we can't technically cover the tabs for empty state, would it be possible to hide them?
emptylist.svg.zip

On Wed, Jun 22, 2016 at 6:21 PM jab notifications@github.com wrote:

Just took a first pass at the new "empty roster" screen @ohnocassio
https://github.com/ohnocassio spec'ed here
https://docs.google.com/presentation/d/1s5xPRRDrmoNNVo1gSrRMBpaxBif2UVV92Yvnp8nv8P0/edit#slide=id.g111b1d71ce_0_36
:
[image: screen shot 2016-06-22 at 18 17 08]
https://cloud.githubusercontent.com/assets/64992/16285709/bbc886f2-38a5-11e6-906d-945cf865a021.png
Wasn't immediately obvious how to get it to cover up the get/share-access
tabs (seems like it's trapped inside a shadow DOM that starts below the
tabs). Anyone?

Maybe use a modal paper-dialog?
https://elements.polymer-project.org/elements/paper-dialog

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/uProxy/uproxy/pull/2500#issuecomment-227895259, or mute
the thread
https://github.com/notifications/unsubscribe/AAG7nfuo9YuWFr75ZNg3w4cRwV0ptZHEks5qObVUgaJpZM4I8FCX
.

As of c98b0a9 the get/share tabs are hidden when we show the empty-roster instructions:

@ohnocassio added your latest emptylist.svg in c88fe72!

@fortuna I think paper-dialog might make it a bit tricky to keep the element, and the down arrow we attach to it, positioned correctly above the + button as the window is resized. Do you think it looks ok as is?

@fortuna Also note that pending #1900 we're stuck on Polymer 0.5 for now, so the paper-dialog we can use is https://docs-05-dot-polymer-project.appspot.com/0.5/docs/elements/paper-dialog.html

Ok @trevj, I think I've resolved all outstanding issues. 👍 ?

Screenshots from testing with Firefox:

Weird: in Firefox, Cloud is not being moved to the front of the networks list, which should be happening as of bec4733.

More bedeviling is that when I go into FF debugging tools to search for moveToFront across all files (that's what the ! does), there are 0 matches:

Weird! Did you rebuild with grunt build_firefox? Assuming you can it working though, :+1: and thanks for tackling all these items!

Just some wonky logic in bec4733826cc19cdb220726d55ca7a63e34c20a3 (d'oh). Fixed in a0d9973:

Still 🙅  FF debugging tools were no help. Any idea why that code search didn't work? There isn't any name mangling in FF that isn't in Chrome, right?

And build is green. Merged!

authors: fortuna jab ohnocassio trevj


text:
Custom Container View Controller

I've found this component's UX very well designed. However, it does not correctly implements a custom container view controller. This is important to get right because of the lifecycle of child view controllers.
There's more info about this here: https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html

Thanks for your feedback. I'll look more into it in the morning and will look into fixing this issue as soon as possible.

On Jan 11, 2015, at 5:44 PM, Marcelo Fabri notifications@github.com wrote:
I've found this component's UX very well designed. However, it does not correctly implements a custom container view controller. This is important to get right because of the lifecycle of child view controllers.
There're more info about this here: https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html
—
Reply to this email directly or view it on GitHub.

I have added the view controllers as child view controllers as explained in the link you sent. I'm not sure what else needs to be added/changed within my library. Can you lead me in the right direction if there is more involved in it than what I changed so far? Thanks! I'm definitely looking to conform to the guidelines and get the life cycle of each view controller right.

It all depends on when one expects viewDidAppear & friends to be called. IMO, they should be called when they are actually selected (and not on the menu's creation). To do so, a bit more of working needs to be done. I'm pasting an implementation I have for a project (in Objective-C).
This is the method called to show a view controller on my custom container:
- (void)showViewControllerAtIndex:(NSInteger)idx
    if (idx == self.viewControllerIndex) return;

    if (self.viewControllerIndex >= 0) {
        UIViewController *old = self.viewControllers[self.viewControllerIndex];
        [old willMoveToParentViewController:nil];

        [old.view removeFromSuperview];
        [old removeFromParentViewController];

        [old didMoveToParentViewController:nil];
    }

    UIViewController *vc = self.viewControllers[idx];

    [vc willMoveToParentViewController:self];

   // not using auto layout here
    vc.view.frame = self.containerView.bounds;

    // make sure that it resizes on rotation automatically
    vc.view.autoresizingMask = self.containerView.autoresizingMask;

    [self addChildViewController:vc];
    [self.containerView addSubview:vc.view];
    [vc didMoveToParentViewController:self];

    self.viewControllerIndex = idx;

I am close to releasing an updated version of this library. I just have one question I would like to get your feedback on. Lets say I have 3 menu items (Menu1, Menu2, Menu3) and Menu1 is currently selected. If I then click on Menu3 it will call viewWillAppear on Menu2 and then on Menu3 because it needs to move through Menu2 to get to Menu3. Do you think that is an acceptable behavior? Thanks for your time!

Yeah, I think it's ok. I'd only just add a note about this somewhere.

Resolved in version 1.1.0

authors: fahlout marcelofabri

repo: uacaps/PageMenu


text:
[Feature] Create a request holder

Create a configuration to hold a request for x time.
It should be something like:
request {
    path = "/holdTheRequest"
    method = "GET"
    holdTheRequestInMilli = 500
}

This feature is ready to be used.

repo: uaihebert/uaiMockServer


text:
Update README.md in order to remark the error

References #9

Nice, but could you remove the "to avoid error like https://github.com/ubaldot/vim-conda-activate/issues/9" part? :)

... and this part "(In Windows, it might be the base environment in default)" because I already wrote that you should not start from base environment.

Of course. I have removed them.

authors: YZircon ubaldot

repo: ubaldot/vim-conda-activate


text:
cannot compile gym_tensorflow

After I run make under gym_tensorflow, I got the flowing error messages
.//atari/tf_atari.cpp:137:16: error: ‘std::string AtariEnvironment::DebugString()’ marked ‘override’, but does not override
string DebugString() override { return "AtariEnvironment"; }
.//atari/tf_atari.cpp:155:64: error: invalid new-expression of abstract class type ‘AtariEnvironment’
AtariEnvironment* env = new AtariEnvironment(batch_size);
What's the problem?

change tensorflow version to pip install tensorflow==1.13.0

pip install tensorflow==1.13.0
try it !!

repo: uber-research/ape-x


text:
Allow date picker quick select to be used for single-day selects

Feature description
Quick select on date pickers is only enabled for date pickers for which isRange is true. Would be great to allow quick select for date pickers where the goal is to pick one specific date.

can you provide some examples of useful quick select options?

A user is scheduling an appointment for a specific day/time, and 'today' or 'tomorrow' could be quick select links for that specific day

repo: uber-web/baseui


text:
Add Authenticate() API procedure

Declare Authenticate() RPC to authenticate user by username and password.
This RPC will return JWT token if authentication is successful.
More authentication related details can be found here: https://docs.google.com/document/d/13GxRBZfQkLyhDCrpFaZmRcw7DJJG-zdy0_mPXy3CcWw/edit

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Mantas Sidlauskas seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Seems all good to me, though doubtlessly might require a little iteration in the implementation section. I do want to hear @Groxx 's concerns though

It is decided to use external Identity Provider for Oauth, this interface is not needed

repo: uber/cadence-idl


text:
Remove CompleteForkBranchRequest

After using history scanner, we do not rely on timeout to delete history anymore. This is not doing anything useful just taking one more persistence call.

#2675

repo: uber/cadence


text:
Clean up controller classes

Additional clean ups of the controllers
Change List

Move map-specific rotation logic into MapController
Support keyboard navigation and transition in both OrbitController and OrthographicController

Coverage increased (+0.009%) to 61.409% when pulling 2adb4b667530ad819fa23a79e5e3b4e400ea57a4 on controllers-cleanup into 77d8742e822b02a04f49edb52d4940270269803d on ortho-view-commonspace.

authors: Pessimistress coveralls


text:
Refactor HoodieCommitArchiveLog

This should archive all the instants into a archive timeline log (not just commits)

Remove HoodieCommitArchiveLog use the HoodieLogFormat to archive commits
Introduce Avro schemas for archived commits (not used in the active timeline)
Archive all instants - not just commits to the archivelog

repo: uber/hoodie


text:
Train-Test Dataset Split

Is there currently support for splitting a Petastorm dataset into train-test for PyTorch? In PyTorch, one would typically do this to a Dataset class but since Petastorm only has the classes Reader and DataLoader (as below), I wonder if this feature has been implemented.
trainloader = DataLoader(make_reader('file://' + filename), batch_size=128)

You can use make_reader(..., predicate=in_lambda(['sample_id'], lambda x: x % 10 < 2)). The predicate will be called for each sample (or batch in case of make_batch_reader). You can decide which rows are included in the current split.
We have off-the-shelf in_pseudorandom_split predicate which implements this kind of partitioning for you. For example:
make_reader(..., predicate=in_pseudorandom_split([0.8, 0.2], 0, 'sample_id')) will return 80% of the samples you can use a training set. Using in_pseudorandom_split([0.8, 0,2], 1, 'sample_id') would return the complimenting 80%.
Note that #393 makes the function work also with non-string fields.
In order for this approach to work more effectively and avoid loading and (automatically) discarding data from the split you are not interested in, it would be recommended to keep your parquet sorted or partitioned by the field you use for your split criteria.

Consider the following block when the schema has the columns filename, image, and label:
def _transform_row_train(cifar_row):
    result_row = {
        'image': cifar_row['image'],
        'label': cifar_row['label']
    }
    return result_row

transform_spec_train = TransformSpec(_transform_row_train, removed_fields=['filename'])

trainloader = DataLoader(make_reader(filename,
    predicate=in_pseudorandom_split([0.75, 0.25], 0, 'filename'),
    transform_spec=transform_spec_train))

This block will produce an error that cifar_row has no keys 'image' or 'label'. It turns out that transform_spec performs its operations only on the columns specified as the third argument of predicate. Is this the desired functionality?

Nope. That was not an aware choice. I think you are right. It makes sense to filter first by predicate and then apply the transform. Actually, with make_batch_reader the order is correct. We should fix it.
Created #394 with a fix. Can you please try and let me know if it works for you?

Both #393 and #394 work!

These are good news! Will include them in the next release probably within couple of days up to two weeks from now.

In order for this approach to work more effectively and avoid loading and (automatically) discarding data from the split you are not interested in, it would be recommended to keep your parquet sorted or partitioned by the field you use for your split criteria.

So let's say my data had pre-defined train, test, validation sets and I wanted to implement parquet store partitioning so each could be efficiently loaded.  When I look for examples of how to implement retrieval by partition key (e.g. PartitionKeyInSetPredicate):
https://github.com/uber/petastorm/blob/master/petastorm/tests/test_end_to_end_predicates_impl.py#L20
...it looks like it is evaluating the partition key value by value from the row data (and not using directory pruning based on the parquet partitioning).  Am I perhaps looking at the wrong sample here or is there some other way that the directory pruning occurs?  Thanks...

Unfortunately it doesn't seem to work that way... Petastorm can't find _common_meta when I use a targeted partition like this file:///var/nfs/general/fmowRGB/splitName\=train.  The following error results:
  File "/home/user1/venv_tf/venv/lib/python3.6/site-packages/petastorm/etl/dataset_metadata.py", line 344, in get_schema
    'Could not find _common_metadata file. Use materialize_dataset(..) in'

However it does work with native pyarrow.parquet:
>>> dataset = pq.ParquetDataset('/var/nfs/general/fmowRGB/splitName=train/')
>>> table = dataset.read()
>>> pandasTable = table.to_pandas()
>>> pandasTable
  category                                           filename  \
0  airport  /var/tmp/fmowRgbSplitsSample/train/airport/air...
1  airport  /var/tmp/fmowRgbSplitsSample/train/airport/air...
2  airport  /var/tmp/fmowRgbSplitsSample/train/airport/air...
...

Note that splitName is not a column when I do this.  If I rename _common_metadata so that presumably pyarrow.parquet can not find it, it still properly loads the partition.  Perhaps parquet stops treating it like a dataset when a partition is specified and just treats it like a set of parquet files.
Spark works similarly to pyarray parquet by default but you can apparently apply a base_path to target a partition and still have the partition column be included:
https://spark.apache.org/docs/latest/sql-data-sources-parquet.html#partition-discovery

I looked into the metadata files.  As I understand it, only parquet-mr writes these files. Pyarrow Parquet does not write them.  And neither Spark nor parquet-mr require them at all.  These files appear to be deprecated in parquet-mr to be removed in the 2.0 release (no indication when that will be).

Sorry for the delayed response.
You are right. Petastorm uses _common_metadata as a place to store an instance of a Unischema and the count of rowgroups per file (helps to start reading faster as our minimal scheduling unit is a rowgroup).
As am alternative, it should be possible to pass a base_path argument to make_reader (similar to pyspark), and get all the information we need from there.
Before we do that, I was wondering if the idea with defining the predicate only on partition-by fields does not work (the one that goes via _apply_predicate_to_row_groups code path).

Yes, it did work.  I was able to pass in a "train" partition/splitName and use a predicate to only retrieve those values, viz:
python petaTest.PartitionKeyPredicate.py file:///var/nfs/general/fmowRGB/ train
I also verified it still worked if I deleted the directories containing the other partitions (val and test) to make certain nothing was accessing them or even depending on them in any way.  👍
The only catch was that I had to put a decode on the values (unlike the Petastorm predicate example).
class PartitionKeyInSetPredicate(PredicateBase):
...
    def do_include(self, values):
        return values['splitName'].decode() in self._inclusion_values

Is that just a Python 2 vs Python 3 thing?

What is the numpy dtype you use to define splitName in UnischemaField? We have a similar example in test_predicate_on_partition unit test. The field is defined with np.unicode_ type and it that definition works transparently with PY2 and PY3:
    UnischemaField('partition_key', np.unicode_, (), ...

Perhaps using np.unicode_would solve your case as well?

I guess I never came across the unicode example and should have dug into numpy types.  I've been using:
UnischemaField('splitName', np.string_, (),ScalarCodec(StringType()), nullable=False)
In case anyone else gets tripped up by this, here is the numpy reference:
https://numpy.org/devdocs/reference/arrays.dtypes.html#string-dtype-note
Thanks for the pointer...

authors: cupdike selitvin seranotannason

repo: uber/petastorm


text:
add auto-guide support to sparse gamma def example

added auto-guide support in addition to the already existing custom guide
this required a few bug fixes in auto-guide land (h/t @fritzo)
now using TraceMeanField_ELBO
added vectorized evaluation logic

Ok, I've pushed a fix to autoguide, but now it looks like your model errors somewhere in your code. Can you see if you can fix this next error?

```
$ python examples/sparse_gamma_def.py --learning-rate 0.1 --eval-particles 2 --auto-guide
loading training data...
beginning training...
Traceback (most recent call last):
File "examples/sparse_gamma_def.py", line 165, in
main(args)
File "examples/sparse_gamma_def.py", line 153, in main
loss = svi_eval.evaluate_loss(data)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/svi.py", line 83, in evaluate_loss
return torch_item(self.loss(self.model, self.guide, *args, **kwargs))
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/trace_elbo.py", line 65, in loss
for model_trace, guide_trace in self._get_traces(model, guide, *args, **kwargs):
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/elbo.py", line 157, in _get_traces
yield self._get_vectorized_trace(model, guide, *args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/elbo.py", line 139, in _get_vectorized_trace
*args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/trace_elbo.py", line 52, in _get_trace
"flat", self.max_plate_nesting, model, guide, *args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/enum.py", line 40, in get_importance_trace
graph_type=graph_type).get_trace(*args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/poutine/trace_messenger.py", line 169, in get_trace
self(*args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/poutine/trace_messenger.py", line 153, in call
traceback)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/poutine/trace_messenger.py", line 147, in call
ret = self.fn(*args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/poutine/messenger.py", line 27, in _wraps
return fn(*args, **kwargs)
File "/Users/fritzobermeyer/github/uber/pyro/pyro/infer/elbo.py", line 127, in wrapped_fn
return fn(*args, **kwargs)
File "examples/sparse_gamma_def.py", line 66, in model
mean_mid = torch.matmul(z_top, w_top.reshape(-1, self.top_width, self.mid_width))
RuntimeError: The size of tensor a (2) must match the size of tensor b (4) at non-singleton dimension 1
Trace Shapes:
Param Sites:
Sample Sites:
num_particles_vectorized dist           |
value         2 |
w_top_plate dist           |
value      4000 |
w_top dist   2  4000 |
value 2 2  4000 |
w_mid_plate dist           |
value       600 |
w_mid dist   2   600 |
value 2 2   600 |
w_bottom_plate dist           |
value     61440 |
w_bottom dist   2 61440 |
value 2 2 61440 |
data dist           |
value       320 |
z_top dist   2   320 | 100
value 2 2   320 | 100
</details>

@jpchen you can reference this example code as another example of auto-guide usage when you add auto-guide stuff to your bayesian linear regression tutorial

authors: fritzo martinjankowiak

repo: uber/pyro


text:
UBSDKRideRequestButtonDelegate methods not invoked.

This is the Ride request button:
UBSDKRideRequestViewRequestingBehavior *requestBehavior = [[UBSDKRideRequestViewRequestingBehavior alloc] initWithPresentingViewController:self];

requestBehavior.modalRideRequestViewController.delegate = self;
UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
[builder setPickupToCurrentLocation];
UBSDKRideParameters *parameters = [builder build];
UBSDKRideRequestButton *button = [[UBSDKRideRequestButton alloc] initWithRideParameters: parameters requestingBehavior: requestBehavior];

button.delegate = self;

I am receiving the callbacks for UBSDKModalViewControllerDelegate Methods, but no callbacks when a ride is accepted or if an error occurs.

Currently, there are no callbacks to indicate when a ride is accepted (see #53). As for error handling, most of that is taken care of for you by the Ride Request View Controller. Are you trying to add custom error handling logic?

@jbrophy17  But what is the point of this delegate then "UBSDKRideRequestButtonDelegate" which is defined in the RideRequestButton... It has two methods which are not getting invoked. So, is this a known issue or am I doing something wrong?

func rideRequestButtonDidLoadRideInformation(button: RideRequestButton)
func rideRequestButton(button: RideRequestButton, didReceiveError error: RidesError)

func rideRequestButtonDidLoadRideInformation(button: RideRequestButton) is called when the button loads the information based on the ride parameters you set. So when it updates to display the product name and the estimated price
func rideRequestButton(button: RideRequestButton, didReceiveError error: RidesError) is called if the button encounters an error when loading the information.

@jbrophy17 here are some cases, when the button doesn't have any delegate methods:
https://github.com/uber/rides-ios-sdk/blob/master/source/UberRides/RideRequestButton.swift#L423
And then
https://github.com/uber/rides-ios-sdk/blob/master/source/UberRides/RideRequestButton.swift#L378
So in this case, we won't receive any information about time estimations, and we, as developers won't know, if there'll be any updates any time soon for the button, or may be we should trigger another one with new location.

@PaulTaykalo That is a good find, if the time estimate response is empty, then no delegate method will be called. If you like, you can put up a PR and I would be happy to review it, otherwise I will patch this for the next update

In case of [builder setPickupToCurrentLocation] the delegate is not called as well because the guard in RideRequestButton.swift:368 causes an early exit without error callback.

@futuretap also a great find. I will make sure the fix also covers this use case

Fixed in v0.5.3

repo: uber/rides-ios-sdk


text:
Implement tcat

Taking @benfleis’s work, I’ve swapped out the command parser with SHON (death to minimism) and added support for tcat subcommands. Thus, tcat 127.0.0.1:8888 service method -- jq .property' is now a thing you can do.
As needed, we can talk about:

[ ] support for Hyperbahn client
[ ] support for Thrift
[ ] support for multiple endpoints
[ ] support for readline interactive streaming
[ ] support for raw TTY interactive streaming, a.k.a., GAPING_SECURITY_HOLE, or simply, COOL_DEMO
[ ] support for a prefork pool

r @malandrew @Raynos @ShanniLi

This is alas missing the release boat, but we will circle back and get it included.

repo: uber/tcurl


text:
chore: switch coreos testing to 41

https://builds.coreos.fedoraproject.org/browser?stream=testing&arch=x86_64

This needs a corresponding akmods PR

skopeo inspect docker://quay.io/fedora/fedora-coreos:testing|jq '.Labels."ostree.linux"'
"6.11.5-300.fc41.x86_64"

authors: bsherman qoijjj

repo: ublue-os/kernel-cache


text:
use dump plugin instead of copy plugin, as it gets into deprecation mode with snapcraft 2.14 onwards

This doesn't convert ALL snaps to the dump plugin because some don't build right now. Issues are filed.

This pull request is now managed with CodeReviewHub. Refresh.

Thanks for the review @didrocks - all should be fixed.

Changes are now good! Thanks Daniel :)

authors: dholbach didrocks

repo: ubuntu/snappy-playpen


text:
Update the metadata topic

Add info about:

The VU minimal metadata standard https://github.com/vu-rdm-tech/metadata/blob/main/minimal_metadata_guide.md should be the guideline.
Mention the DataCite metadata standard (used by Yoda, Zenodo, many others)
Mention  DataCite under "Dataset registration" since this is the mechanism through which metadata is published to the internet (from at least Zenodo, DataverseNL, Yoda and OSF)
Melite https://github.com/vu-rdm-tech/melite-metadata. To add structured metadata to systems that do not support a particular standard.
Remove "Archiving & FAIR Principles", wrong topic
"Dataset registration" as described is commonly (DataCite, Yoda, DataverseNL, Zenodo) called "Publishing" or use "Publishing metadata" to avoid confusion with Open Data. Maybe leave out altogether since this has it's own topic?

In general should this not be rewritten from the perspective of a researcher who needs to publish a dataset and needs some guidance on what to fill in the form she is presented with? It's nice to know there are more standards, but it's mostly irrelevant to researchers they just need to be able to follow guidelines the VU and the repository mandate.
Suggestion: host the minimal metadata guide on the handbook. I think it's mentioned in the VU policy so it would be good to have it easily accessible somewhere.

Thanks @peer35 🙏 We literally just pushed an update to the metadata page, so could you verify whether these points are for the latest version? https://rdm.vu.nl/topics/metadata.html

Regarding @peer35 points, the current metadata page does not contain the following:

minimal VU data standard
Melite

Also, I agree with the point:

In general should this not be rewritten from the perspective of a researcher who needs to publish a dataset and needs some guidance on what to fill in the form she is presented with?

as the current page now is less of a guide and more of a description of what metadata is.

@Kostusas that is a fair point, however this is a topic page and not a guide page. To highlight:

A topic is a specific subject that can be helpful to know about in your daily research. Each page can be read on its own. These pages are a quick way to learn about specific things.

A guide on the other hand

help[s] you find answers to questions that come up while doing research. They help guide you through various topics at once.

With that in mind, what question would you want to see answered for researchers? That would be the start of a guide, for example. We can also find specific revisions for the topic, taking into account it is only a description.

authors: Kostusas chartgerink peer35

repo: ubvu/open-handbook


text:
Help people who want to run tests

Now you can use run-asm-tests etc...

Do you need to include those Makefrags somewhere?

Yeah, you need to include it in the Makefrag in vsim/ and verisim/

Yeah let me push my do-the-right-thing include.

Anyone have problems with this? @zhemao @grebe @abejgonzalez ?

authors: colinschmidt jwright6323 zhemao

repo: ucb-bar/project-template