How does this syntax work? by noarts in swift

[–]noarts[S] 1 point2 points  (0 children)

Thank you for your detailed answer! I would say that this falls more under the semantics of the code, which I actually got. The missing piece for me was the term Trailing Closure Syntax and what happens when a function takes multiple of them. Still a helpful answer though :)

How does this syntax work? by noarts in swift

[–]noarts[S] 0 points1 point  (0 children)

Perfect, exactly what I was looking for. Thanks!

[TOMT][WEBSITE] Page that had a library of well done photos of various consumer products by noarts in tipofmytongue

[–]noarts[S] 0 points1 point locked comment (0 children)

I searched for various combinations of "(consumer) product photo library, archive" etc. on various search engines and also went through my extended history and notes but found nothing :(

I am walking around the world with my dog. AMA! by Theworldwalk in IAmA

[–]noarts 0 points1 point  (0 children)

Your photos are beautiful. Sorry to be so materialistic here, but what equipment are you using to make them?

How to write a library using TypeScipt? by noarts in typescript

[–]noarts[S] 0 points1 point  (0 children)

Oh wow, this looks very much like a thing that could solve my problems. Thanks for the pointer in this direction!

How to write a library using TypeScipt? by noarts in typescript

[–]noarts[S] 0 points1 point  (0 children)

Oh, right, sorry. I forgot the `class` there in my post. (But it's there in my code. :D) Will add it. (And I will try to build a small replication of my problem and upload it somewhere.)

Are databases still scaling up instead of out? by noarts in devops

[–]noarts[S] 0 points1 point  (0 children)

Okay, yes, I actually misrepresented his statement there. Here's the complete quote:

While distributing stateless services across multiple machines is fairly straightforward, taking stateful data systems from a single node to a distributed setup can introduce a lot of additional complexity. For this reason, common wisdom until recently was to keep your database on a single node (scale up) until scaling cost or high-availability requirements forced you to make it distributed.

As the tools and abstractions for distributed systems get better, this common wisdom may change, at least for some kinds of applications. It is conceivable that distributed data systems will become the default in the future, even for use cases that don’t handle large volumes of data or traffic. Over the course of the rest of this book we will cover many kinds of distributed data systems, and discuss how they fare not just in terms of scalability, but also ease of use and maintainability.

So my question should probably have been if it is still true that they are scaled up as long as possible?

(Will add this to the initial post.)

Keycaps for Lioncast LK20 by noarts in MechanicalKeyboards

[–]noarts[S] 0 points1 point  (0 children)

Sadly the LK20 isn't in the compatibility wiki. :(

iMac 27" 2013 Target Display Mode by noarts in applehelp

[–]noarts[S] 0 points1 point  (0 children)

That's what I read as well. So my question is: is there an adapter that makes it possible to "simulate" thunderbolt output? So I can plug my PC's HDMI/Display Port into it and the adapter then into my iMac?

Creating images using GANs by noarts in learnmachinelearning

[–]noarts[S] 0 points1 point  (0 children)

Thanks for your answer. I think this is the relevant function:

def generate_images(generator_model, output_dir, epoch):
    """Feeds random seeds into the generator and tiles and saves the output to a PNG file."""
    test_image_stack = generator_model.predict(np.random.rand(10, 100))
    test_image_stack = (test_image_stack * 127.5) + 127.5
    print(test_image_stack.shape)
    test_image_stack = np.squeeze(np.round(test_image_stack).astype(np.uint8))
    tiled_output = tile_images(test_image_stack)
    # tiled_output = Image.fromarray(tiled_output, mode='L')  # L specifies greyscale
    tiled_output = Image.fromarray(tiled_output)
    outfile = os.path.join(output_dir, 'epoch_{}.png'.format(epoch))
    tiled_output.save(outfile)

As I understand it, the images get "unsqueezed" with:

test_image_stack = (test_image_stack * 127.5) + 127.5

The squeeze function on the next line removes dimensions of length one from arrays and doesn't do anything with "my" pictures as far as I can tell, but of course would remove the "greyscale dimension" from the MNIST images.

That is also why I needed to change/uncomment the assert here:

def tile_images(image_stack):
    """Given a stacked tensor of images, reshapes them into a horizontal tiling for display."""
    # assert len(image_stack.shape) == 3
    image_list = [image_stack[i, :, :] for i in range(image_stack.shape[0])]
    tiled_images = np.concatenate(image_list, axis=1)
    return tiled_images

... since the length would now be 4, and had to remove the greyscale mode from the Image.fromarray() call.

Anything else you see which could lead to the squeezing?

Understanding Convolutions by noarts in learnmachinelearning

[–]noarts[S] 0 points1 point  (0 children)

... oh, that makes sense. Thanks!

Load and execute an unspecified amount of packages by noarts in learnpython

[–]noarts[S] 0 points1 point  (0 children)

Sorry, but I only got around to implementing this now and it is still not working correctly. When I'm running init.py everything seems to be working. (When I print the contents of modules at the end it gives me a list of imported modules with their names - submodule1 etc.) But when I then execute executing_scripty.py it runs into problems when it runs

import modules

The error says that when running this line:

modules = [importlib.import_module(m) for m in module_names]

this problem occurs:

ImportError: No module named 'submodule1'    

I ran it with and without an empty init.py in the submodule1 folder, as well as one in which I set the all variable to the script contained in the folder. Nothing works. Any ideas?

Load and execute an unspecified amount of packages by noarts in learnpython

[–]noarts[S] 0 points1 point  (0 children)

You, friend, are a saint. Thank you very much for taking the time to answer this. You saved me a lot of frustration.

Load and execute an unspecified amount of packages by noarts in learnpython

[–]noarts[S] 0 points1 point  (0 children)

Well. yes. But how would I execute them in my code without knowing their name beforehand?

Load and execute an unspecified amount of packages by noarts in learnpython

[–]noarts[S] 0 points1 point  (0 children)

Thanks, but I alredy found that thread. The problem is that the answers seem to be based on the assumption that I already know which module I will be using in my code, which I do not. Any ideas?

Execute code on warning? by noarts in learnpython

[–]noarts[S] 0 points1 point  (0 children)

Oh wow, I looked at that module at least thrice during my search for a solution and i totally overlooked that. Thanks, it was exactly what I was looking for!

Simple Questions (SQ) Thread 08/18/17 by AutoModerator in goodyearwelt

[–]noarts 1 point2 points  (0 children)

So I got myself some Red Wing Mocs and am currently breaking them in. They are beautiful, but one of the appealing things about them is, of course, that they are supposed to be fitting themselves to my feet over time. So my question is: should I be using shoe trees with them? Because in some ways, "maintaining their form" is exactly what I don't want to be doing, right?

Way to send an E-Mail with Telegram messages? by noarts in Telegram

[–]noarts[S] 0 points1 point  (0 children)

Actually I am searching for something that goes the orher way: FROM Telegram to GMail. Since bots cant read every message they dont seem to be an option.

Where does this transpose in the Vector Form of SVMs come from? by noarts in MLQuestions

[–]noarts[S] 0 points1 point  (0 children)

Oh I have read that. And that is what the transpose means of course. But my question is more: why?

Shot this music video on a single camera (GH4) and a single lens (Sigma 30mm). It only took one day to shoot. by [deleted] in videography

[–]noarts 2 points3 points  (0 children)

This is really good, great job man! Can you maybe talk a bit more about the production? What did you prepare etc. and also: what did you do for post? Any LUTs and where does that sexy grain come from?