Integration of basic authentication to User Pool

Hello,
How can I do a basic authentication (e.g. get access token) to a user pool on Cognito ?
All I was able to see in the repo was connections to Identity Providers (such as Facebook...).
Thanks!

It isn't supported in this. One user posted some code here that gave me a jump no connecting using user pools though.
It isn't clear what the roadmap is for proper AWS support of Cognito yet in react-native so for now the best hope imo is to cobble together bits from the ios and androis SDK's into react bridge code.

Ok I was able to use AWSRNCognitoCredentials with the CognitoUserPool backing.
A few things I needed to do for understanding this non-documented thing:
JS bug
The AWSCognitoCredentials.js has a bug at line 48 which needs to be changed to:
      listener.addListener("LoginsRequestedEvent", async ({callbackId}) => {

You might get some odd JSON errors from RCTConvert if you don't make this change. Basically the event raised from the native code is LoginRequestEvent and that will send a payload of a NSDictionary that has something like { callbackId: <uuid> }.
Workflow
First, you need to authenticate against the user pool and pull the idToken out of the response. that is the missing thing in this sdk.  The code I linked earlier can get a head start on that.
Once you have that, you need to use that token for using the federated identity flow.
When you call initWithOptions here you can call setLogins but only android needs that. What you need to be sure you provide is a getLogins callback func that returns a JS map (object) where the key is the following format:
var logins = {}
logins[`cognito-idp.${REGION}.amazonaws.com/${USER_POOL_ID}`] = idTokenFromUserPool;

If you try to use the accessToken you'll get a complain that it is missing the aud claim, which makes sense ... the access token trims out some claims from identity token.

Checking it out
On IOS I made these calls and they worked once I figured out all that other junk:
                const fetchedId = await AWSCognitoCredentials.getCredentialsAsync()
                console.log('called getCredentialsAsync', fetchedId)
                //this doesnt
                console.log('calling getIdentityIDAsync')
                const fetchedId2 = await AWSCognitoCredentials.getIdentityIDAsync()
                console.log('called getIdentityIDAsync', fetchedId2)

I confirmed that my getLogins callback was invoked as expected.
The getCredentialsAsync got a response like:
{
   "AccessKey": <hash>,
   "Expiration": <datetime>,
   "SecretKey": <hash>,
   "SessionKey": <hash>
}

And the getIdentityIDAsync got a response like:
{ identityId: "<region>:<uuid>" }
Deprecated usage of sendAppEventWithName
The SDK needs to be updated to subclass the RCTEventEmitter. See here for details on an approach for that.
It's unlikely this will be done here though so that looks like the next thing to solve...
HTH

@lielran the first drop of this SDK isnt concerned with the UserPool portion, but rather the Cognito Identity Provider side of the story which isnt concerned about login/logout.
I had to roll my own user pool stuff but once you have the id token you can use this sdk. Took me a while to recognize they are unrelated concerns (federation versus persona).

Hello,
I started to work back again on this recently. It seems that the easiest thing to do would be to get the id/access token using Native Bridge (I probably won't need the federation for now anyway).
As you said, @mnichols , this link is a great start.
I added the jars from the Android SDK and created the CognitoPackage implements ReactPackage class as well. I was finally able to compile the project.
Unfortunately, at the very end, I could not load the module, the third does not recognize './Cognito'.
import { NativeModules } from 'react-native';
module.exports = NativeModules.ToastAndroid;
import Cognito from './Cognito';

I will post as soon as I am able to get the token; In the meantime, if anyone was able to make the native bridge working, I'd be glad to hear how to did it :)

@MathieuMailhos there is a missing bit in the Java stuff from that download. Follow the ReactNative docs for creating Native bridges for Android. Specifically make sure your MainActivity and MainApplication files have properly registered the module.
I've gotten pretty far along getting the android and ios sdks bound to ReactNative for user pool support but not quite ready. Their programming model isn't very friendly so reconsidering the approach.

Yes!
So I started to add the missing jars from the SDK:
$ ls android/app/libs/
aws-android-sdk-cognito-2.3.8.jar
aws-android-sdk-core-2.3.8.jar
aws-android-sdk-cognitoidentityprovider-2.3.8.jar

I updated MainApplication.java with:
import com.rctcognito.RCTCognitoPackage;
// and later in the List<ReactPackage>
new RCTCognitoPackage(),

I created the folder in src/main/java/com/rctcognito  which includes:
AppHelper.java
Cognito.java (both from the AWS topic)
and RCTCognitoPackage.java, which is the Reat module:
package com.rctcognito;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class RCTCognitoPackage implements ReactPackage {

        @Override
        public List<Class<? extends JavaScriptModule>> createJSModules() {
                return Collections.emptyList();
        }

        @Override
        public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
                return Collections.emptyList();
        }

        @Override
        public List<NativeModule> createNativeModules( ReactApplicationContext reactContext) {
                List<NativeModule> modules = new ArrayList<>();
                modules.add(new Cognito(reactContext));
                return modules;
        }
}

After all of that, I had a nicely compiling project (which means that package is well-loaded).
I Just had a problem to import it when doing:
import { NativeModules } from 'react-native';
module.exports = NativeModules.ToastAndroid;
import Cognito from './Cognito';

I have a big doubt about ./Cognito syntax

Ah..that's wrong. The module is found at NativeModules.Cognito.
So you can const { Cognito } from NativeModules and that should werk
On Sat, Jan 7, 2017 at 3:38 PM, Mathieu<EMAIL_ADDRESS>wrote:

Yes!
So I started to add the missing jars from the SDK:
$ ls android/app/libs/
aws-android-sdk-cognito-2.3.8.jar
aws-android-sdk-core-2.3.8.jar
aws-android-sdk-cognitoidentityprovider-2.3.8.jar
I updated MainApplication.java with:
import com.rctcognito.RCTCognitoPackage;
// and later in the List
new RCTCognitoPackage(),
I created the folder in src/main/java/com/rctcognito which includes:
AppHelper.java
Cognito.java (both from the AWS topic)
and RCTCognitoPackage.java, which is the Reat module:
package com.rctcognito;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class RCTCognitoPackage implements ReactPackage {
    @Override
    public List<Class<? extends JavaScriptModule>> createJSModules() {
            return Collections.emptyList();
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
            return Collections.emptyList();
    }

    @Override
    public List<NativeModule> createNativeModules( ReactApplicationContext reactContext) {
            List<NativeModule> modules = new ArrayList<>();
            modules.add(new Cognito(reactContext));
            return modules;
    }

}
After all of that, I had a nicely compiling project (which means that
package is well-loaded).
I Just had a problem to import it when doing:
import { NativeModules } from 'react-native';
module.exports = NativeModules.ToastAndroid;
import Cognito from './Cognito';
I have a big doubt about ./Cognito syntax
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/aws-sdk-react-native/issues/27#issuecomment-271115111,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAsC3I1tM18B7Om2J5U8QDd0sn5EY4Nks5rQBPvgaJpZM4LJrt4
.

@mnichols  - I found it strange that the basic part is not supported(get a token) while the advanced is shown in the examples.
also, the solution above is valid for Android,right?
what about wrapping all aws apis via some v4 wrapper(e.g. https://github.com/leimd/react-native-aws-signature )

@mnichols
I was able to succesfuly logon with Facebook on my App and to get:
{
   "AccessKey": <hash>,
   "Expiration": <datetime>,
   "SecretKey": <hash>,
   "SessionKey": <hash>
}
 { identityId: "<region>:<uuid>" }

However, I still have a question. How do I validate, on a remote REST API, that those credentials are valid?
I do not see any Credentials.validate() in any SDK.
It seems that I need to use this credential object and use it against an AWS service pretty much anything right?

@mnichols
I was able to succesfuly logon with Facebook on my App and to get:
{
   "AccessKey": <hash>,
   "Expiration": <datetime>,
   "SecretKey": <hash>,
   "SessionKey": <hash>
}
 { identityId: "<region>:<uuid>" }

However, I still have a question. How do I validate, on a remote REST API, that those credentials are valid?
I do not see any Credentials.validate() in any SDK.
It seems that I need to use this credential object and use it against an AWS service pretty much anything right?
Thank you very much

The idToken you get from Cognito's identity provider is what you use to
connect to AWS services. The way you obtain that idToken depends on how you
have integrated your Cognito Identity Pool with your identity provider
(Cognito User Pool, Facebook, whatever...). As far as refresh tokens with
the REST api and so on...I don't know because I am using their SDK directly
so haven't really needed to use the raw api, but I am sure it is possible.
On Mon, Feb 6, 2017 at 3:41 PM, Mathieu<EMAIL_ADDRESS>wrote:

@mnichols https://github.com/mnichols
I was able to succesfuly logon with Facebook on my App and to get:
{
"AccessKey": ,
"Expiration": ,
"SecretKey": ,
"SessionKey":
}
{ identityId: ":" }
However, I still have a question. How do I validate, on a remote REST API,
that those credentials are valid?
I do not see any Credentials.validate() in any SDK.
It seems that I need to use this credential object and use it against an
AWS service pretty much anything right?
Thank you very much
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/aws-sdk-react-native/issues/27#issuecomment-277838178,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAsC48dZ5xtZQhMfPFCZvHRlzBBCEM_ks5rZ6GEgaJpZM4LJrt4
.

@mnichols  I am trying to get the token from the user pool. I don't know where i have lost. I can't able to create a user in the pool(Users and groups). Kindly provide any sample code to get the token. I am following this link https://medium.com/@thexap/user-authentication-with-react-native-and-amazon-cognito-982cca085916


feat: setup dark mode for the website

This PR sets up dark mode for the website. The toggle button for it is currently commented out. We can uncomment it after the Tailwind CSS classes for dark mode are added to every page of the website. We will add Tailwind CSS classes to the website incrementally with different PRs for different pages.
@akshatnema @anshgoyalevil @sambhavgupta0705

@vishvamsinh28 I prefer adding the button and basic setup first.
We cannot follow this convention of adding tailwind classes one by one
One thing you can do is commit changes one by one in your own branch but we cannot follow this policy in the production branch
In production we need to merge whole at once as we did in the case of typescript migration

As you have commented out the button so how will I check the UI of the website???
Cannot approve anything without seeing the UI

@sambhavgupta0705 I did that 4months ago in my PR but @anshgoyalevil @derberg suggested to open incremental PRs
Here's the comment :- https://github.com/asyncapi/website/pull/2650#pullrequestreview-1878396303

After merging this PR, we will have the basic setup for dark mode in the codebase. After that, anyone can work on dark mode locally, open PRs for adding dark mode to different pages, and once we have covered every page, we can uncomment the dark mode button, making it accessible to all users.

#1269

@anshgoyalevil can you please take a look here

@anshgoyalevil

@sambhavgupta0705 @anshgoyalevil Let's do this after GSoC. By that time, if no one else has opened a PR for this issue, I will start working on it and complete it.

@vishvamsinh28 can you please link the github issue of this PR

@akshatnema @anshgoyalevil closing this PR

@vishvamsinh28 hey man, I see you have closed this issue . If you are not currently working on it I would like to take it on.
Can I move forward with your code changes and improve it , or someone has already taken over ?

@Sahil-Shadwal We don't have any plans to implement this feature on the website. The issue is closed for the time being.


Error with http://eris.okfn.org/ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz

Hi, I was doing this installation but it generates an error. I think without this part I cannot do the test on RDFLib.
pip install http://eris.okfn.org/ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Collecting http://eris.okfn.org/ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9f438>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9f6a0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9f828>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9f9b0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9fb38>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
Exception:
Traceback (most recent call last):
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 142, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 98, in create_connection
raise err
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 88, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
chunked=chunked)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 363, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 167, in connect
conn = self._new_conn()
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 151, in _new_conn
self, "Failed to establish a new connection: %s" % e)
pip._vendor.requests.packages.urllib3.exceptions.NewConnectionError: <pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9fcf8>: Failed to establish a new connection: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 423, in send
timeout=timeout
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 668, in urlopen
release_conn=release_conn, **response_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 668, in urlopen
release_conn=release_conn, **response_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 668, in urlopen
release_conn=release_conn, **response_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 668, in urlopen
release_conn=release_conn, **response_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 668, in urlopen
release_conn=release_conn, **response_kw)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 640, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/retry.py", line 287, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
pip._vendor.requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='eris.okfn.org', port=80): Max retries exceeded with url: /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz (Caused by NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9fcf8>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/download.py", line 853, in _download_http_url
stream=True,
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/home/jaimetrillos/Documents/BDO/virtuoso-python-master/pythonenv/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
pip._vendor.requests.exceptions.ConnectionError: HTTPConnectionPool(host='eris.okfn.org', port=80): Max retries exceeded with url: /ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz (Caused by NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3b63c9fcf8>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

It would depend on your ODBC connection string, your odbc.ini file, and your network configuration.
I am not able to look at virtuoso issues for at least two weeks.
I am still hoping a maintainer will step up for this project.


memory access out of bounds when processing large files with use_drop_zone

Hi!
I found my app becoming unresponsive when working with large files (e.g. 1GB).
let UseDropZoneReturn {
      is_over_drop_zone: _,
      files: _,
  } = use_drop_zone_with_options(
      drop_zone_el,
      UseDropZoneOptions::default().on_drop(move |event| {

          spawn_local(async move {
              for f in event.files.iter() {
                  let js_future = wasm_bindgen_futures::JsFuture::from(f.array_buffer());
                  let js_val = js_future.await.unwrap();
                  let arr = js_sys::Uint8Array::new(&js_val);
                  let data: Vec<u8> = arr.to_vec();

I wonder if files can also be processed via a stream to avoid loading all data into memory at once (if that is supported from browser side)?
Currently it looks like that the file's content is completely loaded into memory: https://github.com/Synphonyte/leptos-use/blob/main/src/use_drop_zone.rs#L92
Uncaught RuntimeError: memory access out of bounds
myapp-ui.js:1508 Uncaught Error: invalid malloc request

That's a very interesting proposition. I'm not sure when I'll have time to work on this. So a PR would be very welcome.


A little error?

i dont know if this is a error from ViaVersion but can you maybe look at it?
http://pastebin.com/WNT93cQx

Simply just a bug with disconnects being printed twice.


Error

I'm getting this error:
  File "test.py", line 42
    print dijkstra (graph, 1)
                 ^
SyntaxError: invalid syntax

when I use this code
from heapq import heappush, heappop
graph = {
    's' : {'t':6, 'y':7},
    't' : {'x':5, 'z':4, 'y':8 },
    'y' : {'z':9, 'x':3},
    'z' : {'x':7, 's': 2},
    'x' : {'t':2}
}

def read_graph(file):
    graph = dict()
    with open(file) as f:
        for l in f:
            (u, v, w) = l.split()
            if int(u) not in graph:
                graph[int(u)] = dict()
            graph[int(u)][int(v)] = int(w)
    return graph

inf = float('inf')
def dijkstra(graph, s):
    n = len(graph.keys())
    dist = dict()
    Q = list()

    for v in graph:
        dist[v] = inf
    dist[s] = 0

    heappush(Q, (dist[s], s))

    while Q:
        d, u = heappop(Q)
        if d < dist[u]:
            dist[u] = d
        for v in graph[u]:
            if dist[v] > dist[u] + graph[u][v]:
                dist[v] = dist[u] + graph[u][v]
                heappush(Q, (dist[v], v))
    return dist

print dijkstra(graph, 1)

All I did was omit the read file line and uncomment the graph.

That was fixed with this print(dijkstra(graph, 1)), but now, I'm getting this error:
exec error: Error: Command failed: /bin/sh -c echo hi | sudo -S -u world python3 packages/custom/algos/server/playground/test.py
Traceback (most recent call last):
  File "packages/custom/algos/server/playground/test.py", line 42, in <module>
    print(dijkstra(graph, 1))
  File "packages/custom/algos/server/playground/test.py", line 36, in dijkstra
    for v in graph[u]:
KeyError: 1

You're trying to read the graph from a file whereas the graph already exists in the definition. Let me know if you are still facing this issue.


Pin jll version?

This came up at the recent Munster workshop. We really cant mix non-semver versions into a semver ecosystem (and still say we have stick to semver in any packages with non-semver deps).
I came out of that strongly in favour of locking down our binary deps like this wherever they hit a package with real semver.
What we have with semver and hard upper bounds is truly amazing compared to Python/R ecosystems, and we should lean into it even more.
Instead of reverting the ~, we can add it to all the previous versions in the registry?
Originally posted by @rafaqz in https://github.com/JuliaGeo/LibSpatialIndex.jl/issues/24#issuecomment-1762867925. Also see the other comments there.

Have you seen any indication that libspatialindex doesn't stick to semver?

But that the right question?
I more inclined assume that any version system that isn't explicitly using semver, can break semver. I cant find any mention of it in their docs either.
I don't think we cant claim to follow semver here either if we don't pin the version.

Do you have an indication that they do? I don't think you can assume semver to be the default.
But I'd say that doesn't matter. The point is, you can't know what changes from upgrading the jll on Ygdrasil. Maybe they do semver and just fixed a bug, but it still breaks our downstream code. Their semver contract is different (changes on a mailinglist?) from ours in the Julia ecosystem (covering our tests?).
Besides, I think a single user encountering a breaking jll is worse than the developer experience of updating the a compat bound here, or not getting direct updates. CompatHelper (does it work for jll?) should help us here as well.

I'm fine with pinning the version, it does give more reassurance we don't accidentally end up in a broken state, given that we don't have reverse tests in Yggdrasil yet.
Please watch https://github.com/JuliaBinaryWrappers/LibSpatialIndex_jll.jl though so new releases are noticed by maintainers, since CompatHelper won't bump the minor version for us, and the JLL can be upgraded by others that won't necessarily know to update the compat here as well.
This JLL is a very simple case since the JLL has neither dependencies nor dependents. I assume you'd like to do this for all JuliaGeo wrapper packages? Don't forget to update the General registry as well, possibly you can use https://github.com/JuliaRegistries/RetroCap.jl. I'd check in the Slack thread first if the General maintainers would be fine with this.


add thirdreality smart plug with power

@greens  please help to review the merge require, thanks

@greens we have changed our plugv2(with power function) model to 3RSP02028BZ,
and plugv1(without power function) model still be 3RSP019BZ
please help to review the merge require, thanks

@greens Can you help to to review the merge require, thanks

Hi @weihuan1111, before we can merge these changes we will need to make sure the devices are Works with SmartThings certified. Could I have you reach out to me<EMAIL_ADDRESS>or provide an email for me to reach out to you? Thanks!

you can reach out to me via @.*** Original ------------------From: Brianj94  @.>Date: Tue,Dec 20,2022 5:09 AMTo: SmartThingsCommunity/SmartThingsEdgeDrivers @.>Cc: weihuan1111 @.>, Mention @.>Subject: Re: [SmartThingsCommunity/SmartThingsEdgeDrivers] add thirdrealitysmart plug with power (PR #435)
Hi @weihuan1111, before we can merge these changes we will need to make sure the devices are Works with SmartThings certified. Could I have you reach out to me @ @.*** or provide an email for me to reach out to you? Thanks!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/pull/435#issuecomment-1358368186",
"url": "https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/pull/435#issuecomment-1358368186",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

Hi @weihuan1111, before we can merge these changes we will need to make sure the devices are Works with SmartThings certified. Could I have you reach out to me<EMAIL_ADDRESS>or provide an email for me to reach out to you? Thanks!

@Brianj94 you can reach out to me via<EMAIL_ADDRESS>

@Brianj94 When this pull request can be merged and any other information we need to provide?

@Brianj94 When this pull request can be merged and any other information we need to provide?

Hi @weihuan1111, Thank you for following up. I will be sending over next steps and status update to you via email in just a moment.
In short the device will need to be tested by our testing partner to ensure it works properly on the platform. Once those tests are passed we can merge the code. There are a few steps we have to take before the device can be tested, but more details coming your way in just a moment.
Thanks!

@Brianj94 When this pull request can be merged and any other information we need to provide?

Hello @weihuan1111, UL testing labs sent over a pre-quote for testing to<EMAIL_ADDRESS>on February 10th. The quote should have came from<EMAIL_ADDRESS>Once this pre-quote is approved, UL will send the official quote and begin testing. Once the devices pass UL testing, we will merge this PR.
If you have any questions please feel free to email me directly at<EMAIL_ADDRESS>Thanks!

reopen

@Brianj94 We have change the deviceProfileName to switch-power-energy, and create a new pull request :  .  Do i need to resubmit certification on Developer Console?

Hi @weihuan1111, yes I recommend cancelling the previous request and submitting a new request with the updated information and PR.
Thanks!


Rearrange and improve RTD docs and switch to Markdown

This is an update of pull request #797 which closed under mysterious circumstances, perhaps because of a forced update of the branch from my local machine.

Improve style, formatting, linking, section arrangement and headings, and prose in documentation.
Symlink the README.md from the repository root so that it shows up on Read The Docs.
Restructure the table of contents and the code contribution sections of the docs.
Replace rST files with Markdown, for ease of editing by contributors. (Currently (rtfd/recommonmark#3) the recommonmark bridge (which allows Sphinx to read Markdown) does not support tables, so the directory structure doc is now a bulleted list instead of a set of tables.)

Fixes: #668.

Automated message from Dropbox CLA bot
@brainwane, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here.

FYI the test errors there are actually the Zulip linter (tools/lint-all) complaining about trailing whitespace in some of the files.

I merged a few of the commits that looked good; am working on cleaning up the little formatting issues in the big commit so we can merge it before more conflicts are introduced.   Will update this thread once I'm done with that process.
@brainwane next time you do something like this, I'd recommend doing the conversions of the large doc files each in their own commit, so that it's easier to merge the ones that are done and leave the rest with open review comments.

OK, I've now merged a version of everything but:
"Add anchor tags to README.md."

(which I left some comments on above; basically wondering if we can drop the "Getting started").  There were a half-dozen small copy-editing changes to the formatting of the markdown, which I tried to note above  @brainwane just so you know what they were, but it wasn't much.  Let me know what you think on that question; once we merge that I'll close the PR.
Thanks for doing this @brainwane!  I think there's more we can do to make the organization clearer (I think the testing doc is still confusingly ordered), but maybe it's best to talk through those at Pycon since I'm not entirely sure what the right solution is :)

I decided to go ahead and merge the README.md change after changing "Zulip -- getting started" to "Zulip overview"; we can always clean things up more on top of this.  Thanks @brainwane, closing this PR.

Automated message from Dropbox CLA bot
@brainwane, thanks for signing the CLA!


Possible issue with codecov which silently ignores an error

[2024-01-01T05:33:30.076Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

This error is only shown in the codecov report, but leads to the test actually succeeding.
This might be intended or not critical, I cannot judge this. Please have a look at PR 146.
I did not change any tests, but added one to cover three lines in in_memory.rs. The test seems to be covering the lines if I check for coverage locally, but I cannot verify it online.
If you think the PR is fine and the error is marginal, I'd appreciate merging it.

It looks like the issue was transient. Today it worked and exposed my first test I added did not succeed in covering a failure of compare_exchange_weak. But the second did.
However, this failure of coverage only appeared after the rebase and the tests are not easy to write. I cannot keep this up indefinitely. These tests are by no means easy to write. The coverage is now back to 100% and overall has actually increased. I think the branch should be merged now.
I leave the issue open, until you decide if this can be merged or should be rejected. With your decision taken, feel free to close the issue.


django-auth-ldap: Upgrade to 1.2.15.

In 1.2.15 version of django-auth-ldap the authenticate() function of LDAPBackend takes
username and password as keyword arguments. This commit updates the code
to match this change.
Fixes #6588

@hackerkid and @timabbott, done.

LGTm

Merged, thanks @umairwaheed!


HTTP: ws ping from client

Feature description
I need to check whether the websocket connection is still alive, and as far as I know, this isn't possible right now in Gatling. Ideally, we would be able to send ping message frames from within scenarios and check for a corresponding pong response. I know the client already responds to pings sent from the server, but this is the other way around.
Use cases
This can be used to test whether or not the current open websockets are still alive.
Test methods
I've tested whether this functionality was already present in Gatling by unplugging my ethernet cable whilst an idle websocket was open. The test results didn't show any indication of a websocket failure/closure and so this can easily lead to incomplete test results. I have also consulted the Gatling documentation, but nothing regarding this subject could be found.
Tested solutions
I've gotten the ping working with the code below, but it's SUPER hacky and doesn't check for a pong response. So it's pretty awful and not workable.
val ws = session("gatling.http.webSocket").as[WsFsm]
val field = classOf[WsFsm].getDeclaredField("currentState") // required to gain insight in Gatling's internal websocket state
field.setAccessible(true)
val fieldWs = classOf[WsIdleState].getDeclaredField("webSocket")
fieldWs.setAccessible(true)
fieldWs.get(field.get(ws).asInstanceOf[WsIdleState]).asInstanceOf[WebSocket].sendFrame(new PingWebSocketFrame())

First, are you sure you're referring to actual Ping WebSocket frames, and not applicative Text frames, like what socket.io does?
FYI, it's not possible to send a Ping frame in Javascript in a web browser so indeed, that's not something we support either.
It makes sense to have the server side (the side that didn't initiate the connection) check that the client peer is still there. Clients can't be trusted to well behave.
We do though automatically reply to a Ping frame with a Pong one (like a browser would).
And in the next release, we'll also be able to automatically reply to some Text frames with another, to support the new keep-alive mechanism in socket.io 4 that has switch keep-alive initiation from the client to the server. See #3929

First, are you sure you're referring to actual Ping WebSocket frames, and not applicative Text frames, like what socket.io does?

I'm referring to actual ping websocket frames.

FYI, it's not possible to send a Ping frame in Javascript in a web browser so indeed, that's not something we support either.

It makes sense to have the server side (the side that didn't initiate the connection) check that the client peer is still there. Clients can't be trusted to well behave.
We do though automatically reply to a Ping frame with a Pong one (like a browser would). And in the next release, we'll also be able to automatically reply to some Text frames with another, to support the new keep-alive mechanism in socket.io 4 that has switch keep-alive initiation from the client to the server. See #3929

I see, but what would be the current solution for detecting whether websockets crash on the serverside? As outlined in my initial issue, when I unplug my ethernet cable during a scenario with open websockets there is no indication whatsoever in the test results that this happened. We should be able to detect and report these kinds of events in the reports in order to properly evaluate load tests, and a client -> server ping seems like the most logical solution to detect this.

I see, but what would be the current solution for detecting whether websockets crash on the serverside? As outlined in my initial issue, when I unplug my ethernet cable during a scenario with open websockets there is no indication whatsoever in the test results that the websocket connection dropped - even subsequent ws().sendText("") messages do not get KO'd. The same occurs when I abruptly terminate the host websocket server - which could be a real-life result of an intense load-test.

@vJoeyz this is something similar, like I described here? https://github.com/gatling/gatling/issues/4116#issuecomment-979044065, instead getting KO'd the WS reconnects and send request and  marked it as OK.

I see, but what would be the current solution for detecting whether websockets crash on the serverside? As outlined in my initial issue, when I unplug my ethernet cable during a scenario with open websockets there is no indication whatsoever in the test results that the websocket connection dropped - even subsequent ws().sendText("") messages do not get KO'd. The same occurs when I abruptly terminate the host websocket server - which could be a real-life result of an intense load-test.

@vJoeyz this is something similar, like I described here? #4116 (comment), instead getting KO'd the WS reconnects and send request and marked it as OK.

It's similar, but even when the reconnect never succeeds the test still doesn't get KO'd.

@rjaros87 @vJoeyz Please stick to the 1 ticket = 1 concern rule. This ticket's title is "ws ping from client". If you run into an issue, please open a dedicated ticket and provide a Short, Self Contained, Correct (Compilable), Example.

@rjaros87 @vJoeyz Please stick to the 1 ticket = 1 concern rule. This ticket's title is "ws ping from client". If you run into an issue, please open a dedicated ticket and provide a Short, Self Contained, Correct (Compilable), Example.

I will, though the original request/concern remains.

I need to check whether the websocket connection is still alive, and as far as I know, this isn't possible right now in Gatling.

I'm not sure we'll implement a feature that doesn't mirror something the actual applications do. How do your actual client  applications deal with closed connections?

I need to check whether the websocket connection is still alive, and as far as I know, this isn't possible right now in Gatling.

I'm not sure we'll implement a feature that doesn't mirror something the actual applications do. How do your actual client applications deal with closed connections?

They use a reconnect mechanism, but afaik Gatling doesn't detect a disconnect/crash when no text or byte messages are being sent. This results in no reconnection at all until the next message is sent, which then gets KO'd.

Gatling currently lazily reconnects when sending a message or a check, not eagerly. IMHO, that’s the correct behavior.
Note: there was a bug on reconnect that was fixed in the latest release.

Gatling currently lazily reconnects when sending a message or a check, not eagerly. IMHO, that’s the correct behavior. Note: there was a bug on reconnect that was fixed in the latest release.

Would you be open to receiving a contribution containing outlined functionality (initiating WebSocket ping frames and listening for a response)?


how to offline generate address  by privatekey or publickey? and how to offline sign?

how to offline generate address  by privatekey or publickey? and how to offline sign?

Please see this documentation on using view-only and offline wallets to sign transactions offline.
One can get the public addresses of a wallet by importing the mnemonic into a keys-only wallet or disconnected WebAssembly wallet:
// keys-only wallet for basic key management
let keysOnlyWallet = await monerojs.createWalletKeys({
  networkType: "stagenet",
  language: "English",
  mnemonic: "darted oatmeal toenail launching frown empty..."
});

// unconnected WebAssembly wallet
let offlineWallet = await monerojs.createWalletWasm({
  path: "my_offline_wallet",
  networkType: "stagenet",
  mnemonic: "spying swept ashtray going hence jester swagger cease spying unusual..."
});

Please see this test which demonstrates using view-only and offline wallets to sign transactions offline.
Also this documentation (for the JavaScript library) may be a helpful reference.
One can get the public addresses of a wallet by importing the mnemonic to a JNI or RPC wallet:
// RPC wallet
MoneroWalletRpc walletRpc = new MoneroWalletRpc("http://localhost:38083", "rpc_user", "abc123");
walletRpc.createWallet(new MoneroWalletConfig()
        .setPath("mywallet")
        .setPassword("supersecretpassword123")
        .setNetworkType(MoneroNetworkType.STAGENET)
        .setMnemonic("hefty value scenic..."));
String address = walletRpc.getPrimaryAddress();

// JNI wallet
MoneroWalletJni walletJni = MoneroWalletJni.createWallet(new MoneroWalletConfig()
        .setPath("mywallet") // in-memory if not given
        .setPassword("supersecretpassword123")
        .setNetworkType(MoneroNetworkType.STAGENET)
        .setMnemonic("hefty value scenic..."));
address = walletJni.getPrimaryAddress();


Acceptance testing and test workflow

Several changes here, in summary:

I slightly tweaked the devshell setup - everything should be functionally the same as before, except that it's got more utilities inside of it and managed with a nix flake now. Should be effectively a no-op (nix-shell still works)
Some of the docs were out-of-sync with the provider inline documentation - some resources lost their descriptors, but I have a separate branch where I'm working on beefing those up.
There's now some task automation in justfile to to things like generate SITE_IDs, username/passowords, and stand up a test container. TODO here to make the version less static and maybe track our latest release.
A new acceptance test for sites. This can be driven with just acceptance-test, which mostly bootstraps the container, runs go test with the right flags, and tears down the container again.
I rolled this test suite into a workflow action to run tests on push to main and pull requests.
Some minor linting checks that the golangci-linter caught; but it ended up complaining about some unused policy-related resources. I want to leave those in there for now while we work on them, so I just commented that out for now.

There's more work to be done to write more acceptance tests but I wanted to get this in as a first step - with actual tests in place we can start branching out into other work more easily.

/cc @chriskuchin

This is a great set of changes. I could see the justfile becoming its own thing for other container testing (openapi fuzz tests anybody?) and I'm glad to see this moving forward here.

Looks great to me Will sync over to my repo and use it to fix the dns read bugs.. The last patch seems to be slightly off

@chriskuchin one thing I almost forgot to mention is that, although I did add in the logic that additionally accepts See Other as a valid login response - which should still be backwards compatible - this change was a result of our debugging but in hindsight probably wasn't the main issue (it was probably the cookies all along). Should I leave that in or take it out? I'm not a go expert but I assume it just continues to work the way it did with the addition that it's okay with redirects.


Adding returnedMessages primitive into L2ToL2CrossDomainMessenger

Description
Adds a way for the L2ToL2CrossDomainMessenger to "send-back" failed messages.
These failed messages are stored on the origin domain's L2ToL2CrossDomainMessenger.
This enables smart contracts to handle "failed" messages.
e.g. the StandardBridge can safely recover stuck funds by validating that a message was indeed NOT successful on the other domain.
For this proposal, we've also prepared a detailed Notion document, found here, that goes through the rationale and need of the returnedMessages mapping and accompanying functionality and required modifications.
We've also prepared an example of the technical PR
We believe this would be an important primitive for Interop and the canonical bridge.
Would love to hear your thoughts and any feedback you might have on this proposal :)
Tests
N/A
Additional context
https://defi-wonderland.notion.site/L2-L2-Stuck-Messages-71a4cdb5a06c48fb94d0b98d89c46a03
previous PR: https://github.com/ethereum-optimism/specs/pull/184
Metadata
N/A
This proposal was developed as an internal research project at @defi-wonderland lead by @0xng.

Just to be clear that the StandardBridge and the L2ToL2CrossDomainMessenger are in different bridge systems. The L1<>L2 bridging contracts are strictly different than the L2<>L2 bridging contracts, so a change to the L2ToL2CrossDomainMessenger wouldn't impact the L1<>L2 StandardBridge flow

Just to be clear that the StandardBridge and the L2ToL2CrossDomainMessenger are in different bridge systems.
oh nice catch, since we don't yet have a L2toL2StandardBridge, I mentioned it as an example, but I'll add a clarification as to not get things confused with the L1<>L2 flow.

I am generally in favor of this approach and would be open to getting it merged, I think it can be a powerful primitive. It doesn't solve the problem of sending to a chain not in the dependency set but that might be impossible to solve (?)
Left a set of comments that are generally minor/aesthetic


only close the socket from the higher level. if encountered read/write…

… error it's already closed.
Motivation
Fix the bug that occurred in testnet.
bug flow: once a connection had to be removed because our cache was full. we would call Close on this connection. which will close the closeChan channel. this will result in an error returned inside MsgConnection's reading flow which will call the same Close again in result in close of a closed channel.
Changes
only close the udp socket from the higher level. if encountered read/write error it's already closed.
Test Plan
added testing.

bors merge

dismissed @lrettig to make bors work, I addressed the comments in last commit. thanks for the help :)!
bors merge


New version: ResumableFunctions v0.5.1

Registering package: ResumableFunctions
Repository: https://github.com/BenLauwens/ResumableFunctions.jl
Created by: @BenLauwens
Version: v0.5.1
Commit: 65f1c62cf446218f54a9927a6831a82e69f40458
Reviewed by: @BenLauwens
Reference: https://github.com/BenLauwens/ResumableFunctions.jl/issues/38

Needs to be retriggered due to conflict.

Retriggered;)


Make ITelemetryBaseLogger.supportsTags required

See #6444 for demo/discussion of how to make the change.

New plan - We're deprecating supportsTags, and in a release soon we'll assume tag support, except for across the loader/runtime boundary where it will be explicitly accounted for.  See #5560


Task: Configuring release task

What is being done in this PR?
This PR sets up the test and publish jobs for the extension.
What are the main choices made to get to this solution?
This solution involves the creation of a few things and tokens, organizations and things in VScode. The reason for it is the VSCode documentation that @YanDeLeon shared with me.
List the manual test cases you've covered before sending this PR:
This one is tricky to test manually so we will need to check once is done.
What was discovered while working on it? (Optional)
How complicated is the Azure echosystem.

Note: I added the secret required in the VSCE_PAT variable.


javax.naming.NotContextException: rmi://54.x.x.x:1099/ngiawf at RegistryContextFactory.URLToContext

I have tweaked the code to use the new Groovy payload given by orange last month.
However in my usecase , i dont have a direct initialContext.lookup available. What i have is the path below-
However right now its failing at line 104 in http://cr.openjdk.java.net/~mduigou/7072353/3/webrev/src/share/classes/com/sun/jndi/rmi/registry/RegistryContextFactory.java.html#104
As the object sent back from the EVIL RMI server is not an instance of Context?
ANy suggestions if this can still be exploited?
javax.naming.NotContextException: rmi://54.x.x.x:1099/ngiawf
	at com.sun.jndi.rmi.registry.RegistryContextFactory.URLToContext(RegistryContextFactory.java:107) ~[?:1.8.0_222]
	at com.sun.jndi.rmi.registry.RegistryContextFactory.getInitialContext(RegistryContextFactory.java:69) ~[?:1.8.0_222]
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) ~[?:1.8.0_222]
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) ~[?:1.8.0_222]
	at javax.naming.InitialContext.init(InitialContext.java:244) ~[?:1.8.0_222]
	at javax.naming.InitialContext.<init>(InitialContext.java:216) ~[?:1.8.0_222]
	at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101) ~[?:1.8.0_222]

you are right, actually its an instance of RemoteReference/Remote.
About how exploit "this", I dont follow you totally，what's the vul code and which part can you control?

@welk1n Does the exploit happen only with the call InitialContext.lookup() ?
Ill paste the code flow

In my application, im able to override two params below-
java.naming.provider.url which i set to rmi server generated by your code -  rmi://54.x.x.x:1099/ngiawf  java.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory
I have groovy and Apache bean Factory in the Classpath, so trying the execByGroovy payload
Java version : <IP_ADDRESS>
Here is the Code flow:-
config contains the overriden params above.
makeDirectoyEnv code basically sets these overridden values in Environment.
 1023  dirEnv = makeDirectoryEnv(this.getUrl(), config);
 1024  dirCtx = new InitialDirContext(dirEnv);
...
**then after some lines ***
1029 eventCtx = (EventContext) new InitialContext(dirEnv).lookup(config.getBaseDn());

Im assuming the actual exploit happens at the lookup function ? Is it right assumption?
2)Secondly right now its failing at 1024 with the stack trace given above. So its not even able to reach lookup. So in which case is it not possible to exploit?


Add cc-specific args to cc_grpc_library rule

In the cc_grpc_library macro, **kwargs is forwarded to both the protobuf
genrule target, as well as the native cc_library that is created. As a
result, it was not possible to pass some args to the underlying
cc_library because they did not exist in the proto genrule.
This commit adds strip_inlude_prefix and include_prefix args.

@yashykt

Doesn't the kwargs parameter already cover this functionality?

It seems like a losing battle to specify individual parameters like this. Why not split things out into cc_args and proto_args? We'd need to think about backwards compatibility here. The docstrings are scant as is. @nicolasnoble Thoughts?

That is a very valid point. Especially with backwards compatibility.
How about keeping the logic as-is, where **kwargs is forwarded to both the proto and cc_library targets. But also add cc_args and proto_args, which are only forwarded to the respective targets.

@kgreenek Sounds like a plan to me. Just want to get @nicolasnoble 's opinion first.

PTAL
I updated the macro to have the following 4 args:

proto_args (dict): Args which are forwarded only to the generated proto_library target.
cc_proto_args (dict): Args which are forwarded only to the generated cc_proto_library target.
grpc_args (dict): Args which are forwarded only to the underlying grpc genrule.
cc_args (dict): Args which are forwarded only to the generated cc_library target.

So, the general defectiveness of just blindly passing down arguments like that is that one could start doing things like my_abstraction_wrapper(cc_args = ["-some-gcc-option"]). This obviously breaks the abstraction layer we need to keep for being able to build on msvc for instance.
In other words, doing so creates a leaky abstraction, which I am not happy about.

It already kinda-sorta breaks the abstraction by passing kwargs down to the underlying rules. But I understand your point.
What I am really looking for is a way to strip the include prefix and set a different one. Our mono-repo was originally set up with a top-level directory called //src with all the code under it. We're in the process of renaming it so our python packages and c++ include statements don't all have "src" in them. Having the ability to override the include prefix for individual grpc targets will enable me to update imports / includes across our codebase in a piece-meal way, before finally moving all the files out of src. At least that's my current best idea.

So that's mainly the reason we have the abstraction layer here. We have things defined at the lowest common denominator, and then specific abstraction layers to expand them accordingly.
For instance, we have externaldeps = ["zlib"], and then we have different scripts depending on where the code is to expand this into the proper deps argument. In github this will expand to "//external:zlib", whereas in the Google's mono repo this will expand to the absolute path to the zlib library.
Very specifically, this script: https://github.com/grpc/grpc/blob/master/bazel/grpc_build_system.bzl only exists in this form in github, and is radically different in Google's mono repo, to account for all the mutations in path. Everything else is the same.

Makes sense. Thanks for sharing that context.
I could undo the last commit in this PR, so it explicitly has args for strip_include_prefix and include_prefix. Or other alternatives. What do you think is the best way for me to achive what I'm trying to do?

Reviving this PR.
@nicolasnoble If that's the case, would it be reasonable to just forward strip_include_prefix and include_prefix instead? Those options should make sense on all supported platforms.


Adding lazy loading to light prop of video thumbnail

How to add image lazy load to the light prop of the player?
Please Help.

+1 this is important.

How can we make playing true to thumbnail which are .mp4 only when the video is in viewport?

is there any solution for this issue yet ?

I think this is solved by https://github.com/cookpete/react-player/pull/1405? You can pass in any component you like in the light prop now.


Is there any suggestion to visualize the RoBERTa? It might be much helpful to understand what's going on inside the model.

❓ Questions and Help
Is there any suggestion to visualize the RoBERTa? It might be much helpful to understand what's going on inside the model.
I have used RoBERTa in my text classification problem by using the script from fairseq (https://github.com/pytorch/fairseq/blob/master/examples/roberta/README.custom_classification.md), but I am curious about what's going on inside the RoBERTa. For example, how attention works inside the model? Any suggestion or visualization tool to help to understand the model will be much appreciated.
Thank you so much.

I think I have found a great tool to visualize the RoBERTa (https://github.com/jessevig/bertviz/blob/master/head_view_roberta.ipynb). If you have any other recommendation, please leave the link. Many thanks.

You could also take a look at https://github.com/facebookresearch/vizseq

You could also take a look at https://github.com/facebookresearch/vizseq

Thank you so much. Another great work about the analysis of BERT's attention is from this paper.
Paper: https://arxiv.org/pdf/1906.04341.pdf
Code: https://github.com/clarkkev/attention-analysis


Potential additions to community components

I propose to contribute below items to community components:

[x] Cluster management by API - add ability to setup AlertsManager Rules (for user-mla) via api
[x] A set of standard Alerts - which could be useful for all user-clusters
[ ] Custom ArgoCD image (which uses git-crypt enabled git) and thus can work with Git-crypt enabled git repos
[ ] Minio operator helm chart - which can replace our default minio installation requirement with flexible minio installation where you can add extra capacity as needed
[ ] Public Cloud Blob storage usage configuration examples instead of minio for thanos, backup, loki, etc. This is better as it is cost optimized and there is no storage exhaustion
[ ] Production grade Harbor registry setup
[ ] kubeflow (nvdia GPU operator support)
[x] ArgoCD Apps definition to tackle installation of all the components in KKP - from nginx-ingress-controller to user-mla and ApplicationInstallation objects. Not much need to run kubermatic_installer
[ ] Helpful alerts like Thanos compact halted, Node-machine mismatch, Heartbeat
[ ] Blackbox exporter integration with user-cluster mla (to run blackbox exporter in user-cluster and get data in user-cluster mla grafana and alerts)
[ ] Custom CA-Certs requirements for various components - like velero
[ ] How to configure grafana to connect to thanos and Loki as DataStore via configuration
[ ] Alerta Configuration to receive alerts from Alertmanager
[x] Loki configuration which uses compactor. by default no compaction is on in loki configuration (this is now also added in default KKP loki config values.yaml so not sure if we need it here)

@toschneck - please check and suggest.. I will create PR according to what you seems worthy of this repo.

Code for below topics is proposed via #112

Cluster management by API - add ability to setup AlertsManager Rules (for user-mla) via api
A set of standard Alerts - which could be useful for all user-clusters
ArgoCD Apps definition to tackle installation of all the components in KKP - from nginx-ingress-controller to user-mla

kubeflow (nvdia GPU operator support)
GPU operator will be added to KKP as default app https://github.com/kubermatic/kubermatic/issues/13017, kubeflow I'm working with @akash-gautam on it


Enable CI deployment of only Core + Transform

The ML Dev environment should not have all the serve components deployed, but just the core + transform.
We need to be able to drive this from the GH environment so we can choose which deployment to run in any given environment.

This is already possible through make infrastructure-transform so assume this story just means add a new workflow file that calls this command


Recommend a linter for Swift?

This may or may not be appropriate in this language. See exercism/docs#54 for details.

There is an experimental one

We probably wont have a real linter for some time.

:+1: for SwiftLint!

I've been using SwiftLint on a production project and we've really liked it. Also, houndci.com supports Swift. What's important to me is having some sort of consistency, which ruleset is used less so.
What can I do to move this forward?

hound looks interesting. https://houndci.com/configuration#swift
@kytrinyx what do you think?

This would be something that would fit perfectly when we move to swift 3 in a couple of months.

I haven't written any swift, so I don't have a basis for comparison.
@marianaIAm have you by any chance written enough Swift in production to have experiential knowledge of linters and style rules?

It looks like Hound CI wraps SwiftLint. I've found SwiftLint to be great over the last n months and would definitely recommend it. Perhaps the real question is: what's a good config to recommend?

@masters3d agreed!
The only quibble I'd have is the variable names one: I think short var names are an anti-pattern, but make not worth having the linter complain?

I guess instead of disabling variable_name we could downgrade it to a warning instead of an error.
variable_name:
    min_length:
        warning: 1
        error: 0

force_try: warning

disabled_rules: # rule identifiers to exclude from running
  - function_body_length
  - line_length

We are adopting SwiftLint for swift3.


⚠ Samsung has degraded performance

In 1453ab1, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 3002 ms

Resolved: Samsung performance has improved in 8824d68.


coverall added to microfinance

Changes Unknown when pulling 3cc4bf6c36a50efb0acdc536f69714773f8070a9 on ravigadila:Travis into ** on MicroPyramid:master**.


Compiled Package Downloads link is broken

https://dl.dropboxusercontent.com/u/12474226/32/ToiletStreamer-0.9.5.exe
or
https://dl.dropboxusercontent.com/u/12474226/ComicStreamer-0.9.51.dmg
for mac at this moment... the windows version is out of date...
You can check back later on:
https://github.com/Tristan79/ComicStreamer

Using that windows exe right now. Really, great work. One strange bit of behavior, when I'm in the "comiclist" section of the library, I can't open any of the books in reader. I have to replace "comiclist" with "folders" in the URL. Is this intentional behavior? Search results come up on a "comiclist" page.
Oh, another thing, when I click the server restart button next to the back arrow in the /settings page (but not  the other restart button that appears under /server), the text is off center. Also, it doesn't seem to be reloading for me after the restart, I end up having to reload the page myself.
Other than that, though, the interface is much improved from the original, the thumbnails are a nice touch, and the whole thing just seems to be faster. Searching by character no longer crashes my server (though it does take a long time, I suppose that's to be expected). I'll report anything else I find, but I see you said that this version is out of date, so I'm probably reporting issues you already know about

I was still running the old original 0.7, and this new mac build certainly looks different.
i think I spotted a bug. I noticed that a most of my chapters of "Ah! My Goddess" were imported with an empty series, but the series was in the title instead. It looks like this has happened in the case were the metadata only had the series and no title (I don't have the title for most).
Given that these archives all have Comic Rack metadata in them, with the series set correctly, it seems like importing the series as a title when there is no title must be a bug.

Reply to both! I have been tinkering with it for a week...
I got a lot of items with no meta data and after trying to detect it from the file name the serie contains the title and the title is empty, so I swapped them, I added that last night :-) I forgot to check for valid metadata first... :-) Will fix that.
The restart window is broken cuz I remove the code while experimenting :-) You have to manually reload the homepage to continue...  the whole gui is a tryout at the moment... I have no idea what I am doing... I change stuff and hope it works (I hacked a close button in the comicreader., yeah!,
...wish there was a page slider), could use some help there...
The restart button mentioned under server is the factory reset/server reset button... :-) The menu orders should be different...
New fun stuff for the mac version:
Try installing (by dragging it to the Application folder) Calibre and enabling ebooks in the comicstreamer settings.
It then scans and read meta data from ebooks like epubs or from a calibre library.
I know it's a comicreader, but it streams books just as good (especially pdf references guides with a lot of pictures :-)
You can always enable pdf in the mac version, I included the conversion tools in the package...    (also just ignore the calibre/mudraw/qpdf paths in the settings, they are not used at the moment, I still have to add that logic)
Enable the cache. It will speed up especially chunky if you pull you're comics from a slower medium and cache it on a fast ssd or internal hdd :-)
If you have a static library in which you only add new files (no remove, or modify, it will crash :-) You can try to install and enable the https://dev.mysql.com/downloads/mysql/ server...  and run it's install on the command line: mysql_secure_installation
Run these SQL commands... (tailored to you're setup)
CREATE DATABASE comicstreamer
CREATE USER 'comic' IDENTIFIED BY 'comic';
GRANT ALL ON *.* TO 'comic';
flush privileges;

And enable mysql in the settings...
Searches and overviews will be (well on my pc) nearly instant especially with large libraries. SQLite is just too slow with bigger data sets... Even searching for characters... :-)
If someone want to help fixing the sqlalchemy integrity error I get when removing comics from the database, please :-)
Haven't looked at the comiclist/folder thing... I will upload a version for windows soon and give a shout here, I changed to much the last week, it probably is fixed already...

Also it also reads cbt, cb7 comics and webp, bmp and a lot of other picture formats in comparison to the 0.7 version....
:-)

Very exciting stuff Tristan! Thank you for all this work, I'm installing the mysql community server now.

Having trouble getting that MySQL server configured. I'm a dunce...
I only see the MSI installer in that link you gave, is that what I should be using? It doesn't let me run that through CMD. When I just run the regular GUI installer, I end up with a program called MySQL Workbench, which doesn't seem to be able to create databases, only connect to them...

You are getting the windows installer! If you are on windows, the windows package is created the day I began tinkering. The new stuff is, as stated, for mac only.
I need a couple of hours of sleep. After that I will venture in the postponed adventure of making a windows 64bit package (on my virtual win10 machine) and 32bit package (without webp :-/ on a virtual xp machine) that is up to date and working and tested.
And some proper instructions on the github forks frontpage on both mac and windows. For windows, hopefully with calibre, qpdf, mudraw support... and mysql. And I will test my linux version on a pi!
If you are using a mac, you can install the mysql osx package, make sure the mysql server is running (click on the mysql icon in the system preferences) and run mysql_secure_installation in the terminal so set things up...
run the sql commands below on the command line or with something like Toad, and tailor then to your own needs... since below gives the user comic access to all databases if you're using mysql, which locally is fine but still a security risk. (check google for right commands).
CREATE DATABASE comicstreamer;
CREATE USER 'comic'@'%' IDENTIFIED BY 'comic';
GRANT ALL PRIVILEGES ON *.*  TO 'comic'@'localhost';
 FLUSH PRIVILEGES;

Alrighty, for now I'll keep sqlite on. But I eagerly await the updated windows version. Much appreciation from myself and those who use my server

Also, new ideas are welcome!
Are you missing anymore features?
I added a cover view to the table pages (you can switch between, see the button above the table)
I am planning to add more cross links, like clicking on series above the random comic, last added/read to a overview of that series...  any thoughts? Are you missing more views to the comic data?
Also, next to tagging comics as favourites, one user was overly enthusiastic about the inverse, so due to that user the blacklist of pages is partly completed. You can thank one user for extracting and sending me over 5000 scanner art images he/she collected for the most popular release groups of american comics for the last 10 years. (use comicstreamer -l, fiddle with this piece of code Which at the moment are replaced with an image! And will be removed from reading in the future version.
Building of on this blacklist.
I can identify, with some extra code, any unique page as long as you do not change the actual page image by resizing/reformatting/etc... them. Inside any comic file!
That means detecting double pages, detecting double comics!
Even if the archive compression format, filenames of the pages or filename of the archive is changed.
Also this means exporting/importing meta data from the database is possible. since even if the archive compression format, filenames of the pages, filename of the archive or the location is changed it still can identify it.
Do you think this is a feature that is useful to have?
Anyway... :-)

I have a dutch scrapper ready. And almost working with comicstreamer, since it scrapes from a site that is static from 2011 but contains the largest info source on dutch comics, I could find up to this date, I probably will include the resulting cache db on github.
Any thought about other scrapers?

I can see how that might be useful for hiding pages with ads, or, sometimes scanners put their logo at the beginning before the cover of the book, which makes the scanner logo come up as the thumbnail instead of the book cover. I like to hide those. I scrape all metadata using ComicRack's ComicVine Scraper plugin, which is very useful. If you're thinking of adding scrapers to ComicStreamer, a ComicVine scraper would be really popular.
How about a userlist? I have a few dozen people who use my comic database remotely over the internet, it would be nice to give each of them a "most recently read" list rather than having one for everyone. Also, it would be cool to be able to to track read progress for individual users. That sounds like it would be a lot of work to implement, but if you ever have the time, I bet that would be a popular feature. Maybe give everyone their own username and password?

Also, a sorting hierarchy. Sometimes when I sort by date, if two issues of the same series come out in the same month, the latter will appear before the former. Could you make it so that we can have it sort by date, and if the dates are the same, it then sorts by issue number?
And how about uploadable home-button thumbnails and backgrounds? This feature isn't too important to me, but it would be cool to be able to upload our own home buttons and list backgrounds through the settings page. Just a thought.

I don't know if you have any control over the HTML5 webreader, I know Balaclark made that. But if you know how it works and can make edits, zooming in and out on tablets is kind of inconvenient. If there's a way to make it multi-touch zoomable (like most images and web pages on tablets), that would make the reading process much more pleasant! Ubooquity's web reader works this way, but ubooquity doesn't handle large databases very well... It doesn't do much with the metadata.
Also with the web reader on (in my case, android) tablets, on double page spreads, when I'm zoomed in to match the page height, even when I'm not looking at the rightmost side of the page, tapping the right side of the screen will go to the next page. If there's a way to make a page switch possible only when scrolled all the way to the right (or all the way to the left for left-to-right mode), and otherwise to make tapping the right side of the screen scroll to the right half of the page, that would be awesome. I've accidentally skipped the second half of double page spreads before! The mobile ComicRack app does this, but it's obviously not browser based and has no streaming features :/

Ok, need sleep first... read rest later...
https://dl.dropboxusercontent.com/u/12474226/32/ComicStreamer 0.9.51.exe
windows xp+, please do not use the pdf, ebook function... it probably won't work
Cache and mysql support experimental, cache does not like webp on xp...
 Was not expecting such a speedy response! Can I buy you a drink or something? Seriously, is there anything I can do for you? Do you want access to my comic server?

And how about uploadable home-button thumbnails and backgrounds? This feature isn't too important to me, but it would be cool to be able to upload our own home button and list backgrounds through the settings page. Just a thought.

You can change and personalise any icon, image or color if you want.
For a package it is located in the install folder on windows in the static folder (or on mac click with other button on the app and select open package in the popup menu and go to the static folder some deep in the pakcage)
Be sure to make a backup such that you do not overwrite them with future installs. Colors are located in comicstreamer.css.

I hate to interrupt your nap, but this installer you just put up is giving me an error message when I try to run ComicStreamer:
"Couldn't open database. Probably the schema has changed."
That's good information about the icons and images! I will work on some themes

Can't think of any features that I'm missing at the moment. I mostly use this app as a library and for putting files into my iPad comic reader (Chunky) every now and then, so my needs are minimal.
The fix for that title/series bug is my main interest at the moment, but I had the following thoughts

Is there a rescan button? I couldn't find one.

On the UI: Personally I think I'd prefer a more sedate UI, maybe something closer to what Mylar has, but it doesn't really matter as long as it works :). That said, it might be nice if there were captions and tooltips on the buttons at the top of the main screen. It's not immediately obvious what they are (and captions because tooltips won't help on a tablet.

Cheers

Just for the heck of it, I took the comicstreamer.exe from the 0.9.5 folder and put it into the 0.9.51 folder. Guess what? It launched! I bet it won't get far with the wrong exe, but I feel clever for getting past that error message, haha. A lucky try I guess.

Cool, I will look into all that, and make a proper windows version, hopefully :-)
The error you got is because I added some new stuff to the config file related to cache, mysql, etc, (and in the latest version qpdf, to decrypt pdf not read by pypdf2) and new tables to the database related to blacklists.
You have to rescan your db and make a fresh new config. (or copy past the old value's to the fresh config file) Make a backup or delete your config/db and start clean.
On windows
start->run
%appdata%\ComicStreamer
it will open your comicstreamer application data folder.
The config file is called comicstreamer.ini and not settings anymore (i wanted to double click on it :-)
also on my setup the windows server reset from the gui did not work at all (it does work on my mac) it would not delete the database file. So, for the moment you can manually delete/backup the database, if something goes wrong or you want to reset.  If something goes wrong with the experimental mysql database, just run the following SQL commands:
drop database comic
create database comic

As I said the MySQL part is experimental... haven't figured all the code out yet :-)
The ebooks and pdf are disabled on windows since I did not fill in the right tools...
For the mac version hopefully fixed the series/title stuff. :-)
I will slowly, fix old bugs and finish the new features.
(Blacklist/Favorites/Cache/PDF&Ebooks/MySQL/DutchScraper)
One thing I will add soon,  The original ToiletSitter, requested this feature: In his own words:

"my hdd had to spin up while I was using chunky. But it spun up too late! only after I selected a comic..."

I am going to make an option to wakeup the hdd or media out of sleep after being idle for some time and it receives a request related comic db (like series overview, or something similar) such that the hdd are already woken when you actually pick a comic.

Very good, very good!
I'm having trouble getting the mysql server working now though...
I installed the server with the community installer. Then, I used the commands you gave to create a database called comicstreamer. I created the user account comic (password comic) during the install, and gave it all permissions, so when I tried to create that account through the command line I got an error.
Here's a snippet from my log, this is how I know MySQL isn't working...
2017-02-14 09:09:19,937 - ERROR - [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
2017-02-14 09:09:19,888 - INFO - Database: SQLite: (C:\Users\Zack\AppData\Roaming\ComicStreamer\comicstreamer.sqlite)
2017-02-14 09:09:19,887 - DEBUG - Database: SQLite: Started
2017-02-14 09:09:19,887 - WARNING - Database: Switching to SQLite Engine
2017-02-14 09:09:19,885 - ERROR - Database: MySQL: Failed (comicstreamer [localhost:3306])
2017-02-14 09:09:19,884 - DEBUG - Database: MySQL: Started

I can't tell if the user 'comic' has actually been created, but I KNOW that the user 'root' exists... So I set the username and password in the toiletstreamer settings to the information for root. Probably not the best idea, but it still isn't working. I'm still getting the MySQL: Failed message in the log.

I got connected with a osx mysql server from windows, I am installing mysql on windows itself... see what happens... :-) And compile a x64 version... :-)
To see the users use:
select host, user from mysql.user;
show databases;
it takes time to download and install,... report back later ;-)

You probably did everything right, I forgot a module...
https://dl.dropboxusercontent.com/u/12474226/ComicStreamer/ComicStreamer-0.9.51-x64.exe

EUREKA! It worked!
I wish I knew more about this stuff, but I'll do whatever I can do to help this project along. I love this program, and I love what you're doing with this program.
I'm rescanning my library into the MySQL database now, it's gonna take a while. I have around 36000 comics. But I'll tell you how everything works once everything's all scanned in. It's very speedy now, but with the Sqlite, I noticed it would slow down as the database got bigger.

above 60.000 or so sqlite takes a break, a nap, probably go out for a bite, and then report back... You can toggle the switch between sqlite and mysql in the settings after you scanned mysql (and of course if you not already did, a scan pass for sqlite) Then toggle between them and restart and try the difference.

@LucidusAtra email<EMAIL_ADDRESS>you could probably help with testing, like windows stuff, blacklisting, userstuff
Ow, one user irc'ed. it run fine with around 200.000 comics. And that the search is broken. It gives all results instead of 50 (default)...
O well another thing to look into ;-)

Okay, I will email you. But also, now that my database is fully scanned, I can't seem to access the server through a browser. I get an endless loading screen... When I stop the MySQL server, I can at least access the settings and switch back to sqlite. Actually, I got it to load the settings page once without stopping the MySQL server. But I can't get to any comic lists, can't get to the page with the random pull, and can't get to the most recently read page. It was working well earlier on in the scan, so I'm guessing it's the size of the database? Maybe I set the MySQL server up wrong?
Oh! As I'm typing this, I'm seeing one of my bookmarked searches load! It seems to be stuck on an empty comic list, "processing."
Here are my logs from after the database finished scanning, maybe they can shed some light on what's going on here?
ComicStreamer.log.txt

Ah, this version won't finish scanning in sqlite mode either! Somewhere in the 23000s, the scanning just stops - the monitor on the stats page says it's still scanning, but a new book hasn't been scanned in 2 hours :(
Here's what the log does after it stops scanning in sqlite mode
2017-02-15 08:29:02,799 - DEBUG - STREAM pHYs 57 9
2017-02-15 08:29:02,799 - DEBUG - sBIT 41 4 (unknown)
2017-02-15 08:29:02,799 - DEBUG - STREAM sBIT 41 4
2017-02-15 08:29:02,799 - DEBUG - STREAM IHDR 16 13
2017-02-15 08:29:02,799 - DEBUG - STREAM IDAT 115 8192
2017-02-15 08:29:02,799 - DEBUG - STREAM tEXt 78 25
2017-02-15 08:29:02,799 - DEBUG - STREAM pHYs 57 9
2017-02-15 08:29:02,799 - DEBUG - sBIT 41 4 (unknown)
2017-02-15 08:29:02,799 - DEBUG - STREAM sBIT 41 4
2017-02-15 08:29:02,799 - DEBUG - STREAM IHDR 16 13

Aha! I broke stuff!
I tested it on a small subset of comics on win10 with the programming environment still installed, and because it's a virtual machine, (windows 10 makes at crawl, pff) i didn't try a bigger test or tried a clean machine... i knew compiling under windows 10 would be more trouble instead of solving things :-)
the other version you have (32bit)  was build on windows xp, that worked with sqlite...
I can not remember changing something there... I will look into this weekend... test in on a clean windows install with a much bigger test set, until then I am property of my family :-)
I would suggest for future testing using an alternative user dir and port (and keep you're working server online :-) by launching it on the command line for example to store the config/db/... in  c:\test,...
run:
comicstreamer.exe --user-dir C:\test\ -p 32501
you can now surf to http://localhost:32501/ while your normal server keeps running on http://localhost:32500/
...also if you restart the new version, it will continue to scan new files, if it fails on the same file please send/link that with email (there is probably an image corrupted/missing some bytes, but it should not stop scanning...)

Hey everyone, I know this is pretty old at this point, but does anyone have the compiled version of 0.7 for mac laying around? I'm trying to run this on an older mac and it can only handle OS X 10.6, so I'm pretty sure that it can't run the newer versions of CS.

Yeah, put it on github so it can not be lost again :-)
https://github.com/Tristan79/ComicStreamerReleases
I had a lot of fun playing with the new alpha version today, I made the web pages interactive (you can now click an writers, series, publisher, pencillers, alternate series...  :-), you could try it from source, the missing packages are just a 'pip install' away :-)
https://github.com/Tristan79/ComicStreamer

Fantastic! Thanks very much!

On Apr 13, 2017, at 9:40 PM, Tristan Crispijn<EMAIL_ADDRESS>wrote:
Yeah, put it on github so it can not be lost again :-)
https://github.com/Tristan79/ComicStreamerReleases https://github.com/Tristan79/ComicStreamerReleases
I had a lot of fun playing with the new alpha version today, I made the web pages interactive (you can now click an writers, series, publisher, pencillers, alternate series... :-), you could try it from source, the missing packages are just a 'pip install' away :-)
https://github.com/Tristan79/ComicStreamer https://github.com/Tristan79/ComicStreamer
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/beville/ComicStreamer/issues/44#issuecomment-294064360, or mute the thread https://github.com/notifications/unsubscribe-auth/AQLd55SUziVSyPwH0vndAmgl1wPv1jwOks5rvs6OgaJpZM4L-shE.

All the boxes are clickable... yeah! :-)

Are there any compiled downloads available? The above links are dead

Anyone awesome enough to compile a Windows version of this build?? Looks great!


Dynamic, generic superclass results in incorrect declaration output

TypeScript Version:  2.3.2
Code
The following is considered to be valid TypeScript code:
export interface IBase<X,Y> {}

export class Base<X,Y> implements IBase<X,Y> {}

export interface BaseCtor<X,Y> {
	new(): IBase<X,Y>;
}

export function CtorFactory<X,Y>(): BaseCtor<X,Y> {
	return Base;
}

export class Derived<X,Y> extends CtorFactory<X,Y>() {
}

Expected behavior:
Unsure. I believe this is a bit of a non-standard way of using extends. Two options:

The code sample above should be rejected as invalid
A correct declaration file should be generated when invoking tsc --declaration.

Actual behavior:
The following declaration file is generated:
export interface IBase<X, Y> {
}
export declare class Base<X, Y> implements IBase<X, Y> {
}
export interface BaseCtor<X, Y> {
    new (): IBase<X, Y>;
}
export declare function CtorFactory<X, Y>(): BaseCtor<X, Y>;
declare const Derived_base: BaseCtor<X, Y>;
export declare class Derived<X, Y> extends Derived_base {
}

The declaration invalid and cannot be used because X and Y are not bound for the declaration of Derived_base.

Should be working as expected in latest.


Mapping models/attributes to tables/columns with underscore?

Hi
It seems that waterline maps models and their attributes to tables and their columns using camelCase, ie. for example a model RaceCar, with a topSpeed attribute, maps to database table racecar and topSpeed column. Is it possible to use underscores in mapping (RaceCar -> race_car & topSpeed -> top_speed) since they are far more common in databases than camelCase?
I know I can do this my defining custom table and column names for models but I would not like to do this for every single model and attribute.
Is it even necessary to rewrite all table's column names as attributes in models?

Hi @Jarzka,
Regarding model names (I take you mean identity), this has to be lower case. Check the model definition docs so there is no camelCase conversion going on there. In other words using identity: 'RaceCar' is invalid and you need to use: identity: 'racecar' or identity: 'race_car'. It's a known limitation that we won't to fix at some point.
Regarding the attributes names. I don't believe there is any conversion going on. If you name an attribute 'top_speed' that should work.
In other words, the following should be valid:
{
  identity: 'race_car',
  attributes: {
    'top_speed': 'float'
  }
}

And map to a race_car table and a top_speed column without needing to use tableName or columnName.

Is it possible to use underscores in mapping (RaceCar -> race_car & topSpeed -> top_speed) since they are far more common in databases than camelCase?

Do you have data to back this? Waterline supports SQL (MySQL, PostGres, etc) and NoSQL (MongoDB, Redis, OrientDB, etc) and even supports any kind of service that has an adapter for. So I'm no so sure that underscores are generally more common than camelCase. Either way waterline does not enforce camelCase so this shouldn't be an issue.

Closing this as inactive, please re-open if you feel this hasn't been fully answered.


Check failed in tf.raw_ops.ConjugateTranspose

Click to expand!
Issue Type
Bug
Have you reproduced the bug with TF nightly?
Yes
Source
source
Tensorflow Version
2.14.0
Custom Code
Yes
OS Platform and Distribution
Ubuntu 20.04
Mobile device
Ubuntu 20.04
Python version
3.8.10
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
A check fail can be triggered in tf.raw_ops.ConjugateTranspose. While under jit compile, it won't occur. There is an inconsistency problem between jit and normal mode.
Standalone code to reproduce the issue
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np

x=tf.random.uniform([], dtype=tf.dtypes.float32, maxval=100000000)
perm=tf.random.uniform([0], dtype=tf.dtypes.int64, minval=-100000000, maxval=1000000000)

@tf.function(jit_compile=True)
def fuzz_jit():
    y = tf.raw_ops.ConjugateTranspose(x=x, perm=perm)
    return y

def fuzz_normal():
    y = tf.raw_ops.ConjugateTranspose(x=x, perm=perm)
    return y

y1 = fuzz_jit()
print('[+] JIT ok') # Under jit compile, it passed the testcase normally.
y2 = fuzz_normal()  # Check fail.
print('[+] Normal ok')  # Won't be printed.

Relevant log output
% python test.py
[+] JIT ok
2023-06-02 11:01:06.844753: F ./tensorflow/core/util/mkl_util.h:1273] Check failed: dims_tf_order.size() > 0 (0 vs. 0)
zsh: abort (core dumped)  python test.py

Hi @Lyutoon ,
I have tried to replicate the reported behaviour with tf-nightly(2.14.0-dev20230601) in colab but I have observed that there is no check fail in both cases with or without jit_compile.I executed the code multiple times also and observed no error or check fail.
Please refer the attached gist and confirm any deviation.
Thanks!


Should Funker functions be able to define types of args/return values?

This could probably be done with protobufs (like GRPC), but some questions that were raised:

Does this add unnecessary complexity? Can we leave it up to the user to do type checking, if required?
How are the types specified? Could they be exposed as labels on the image?

IMHO unusual complexity. Simplicity makes for easier adoption.

KISS


update rules.md stop_times.txt best practices reference link

Updating the Rules.md documentation to fix the stop_times.txt best practices  reference link 404 error.
In RULES.md, the link stop_times.txt best practices provided in the missing_timepoint_column notice is broken.
Additionally, the Best Practice has no mention of timepoint, think link should refer to the specification instead.
It should be replaced by the following link:
https://gtfs.org/schedule/reference/#stop_timestxt

 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.Magesh Rajendiran 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.

Hello @mrajen27, thank you for fixing this issue so quickly!
I left one comment requesting a change, besides this, it looks good 😊.
Another thing: could you pleasesign the CLA agreement.
Thanks for your participation in open source software!


Use lighter, more optimized dictionaries for route sensitive TagHelpers

We currently use Dictionaries to track route data for things like AnchorTagHelper. We can be smarter and use things like RouteValueDictionary to make for a more performant implementation.
@mnltejaswini can provide perf numbers.

There's more to it than just this.
Binding an attribute like asp-route-genre=@genre in a <a> to a string is pretty expensive. We want to also investigate support for asp-routevalues=new { genre } as a more performant alternative. This would work pretty similar to the approach the HtmlHelpers use, and would work nicely with the above.

@rynowak Razor and MVC already support assigning directly to the dictionary. In the <a> and <form> cases, set the asp-all-route-data attribute to set the IDictionary<string, string> RouteValues property.

@dougbu Even when assigning to the dictionary directly those TagHelpers still need to construct an <object, object> version to pass to the generators.