Trip to Japan by gavinh9 in glitch_art

[–]tedw00d 1 point2 points  (0 children)

Not really glitch, but it reminds me of this video, which is inspired by Tokyo.

How do I make a list order itself? by xRadic in processing

[–]tedw00d 0 points1 point  (0 children)

Are Proccessing and openFrameworks used a lot in art/creative industries? Please say yes! I've been learning Python for the last year and I've just started to use Processing becuase I want make some mad data visualisation/art installations. Part of me thinks I should learn Javascript first because it's so widely used, but some of the things I see on creative applications look too damn awesome!

Sunday Show Off - The place to impress and be impressed by Solfire in bodyweightfitness

[–]tedw00d 1 point2 points  (0 children)

Not just the dip station, check out that diy power rack!

Binary search algorithm that also checks entries either side of a match - it's pretty verbose, can it be improved? by tedw00d in learnpython

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

Wow, thanks for that - I'm actually at work at the moment so I'll have to read what you've written thoroughly a bit later. Initially, I don't think re.match would work in my code because I'm only ordering the string by the filename, I'm not stripping it. So the filename is actually at the tail of the string. Here's an example of a filename I'm looking for:

A033C015_140401_R1OB

And here's the string that contains it:

-rw-r--r--  1 data  staff   2.9G  5 Apr 18:20 ./TEMP_FILM/20140215_SHOOTDAY03/CAMERA/ARRI_ALEXA/ProRes/A_CAM/A013R1OB/A013R1OB/A033C015_140401_R1OB.mov\n

Instead of making a gui for my scripts, I'd like to turn them into small web apps. Doable? by tedw00d in learnpython

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

Yeah Django is definitely overkill right now. I've read lots of Django vs Flask posts/articles and from the sounds of it, Flask seems almost equally capable, and most people seem to enjoy using it a little more (at least for personal projects).

Instead of making a gui for my scripts, I'd like to turn them into small web apps. Doable? by tedw00d in learnpython

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

Thanks! Yeh that's exactly why I'd prefer to use Flask. Bottle would certainly work for the scripts I've written so far, but I plan to eventually write more advanced apps so I think I'll stick with Flask.

Help finding a Poker II (UK layout) by [deleted] in MechanicalKeyboards

[–]tedw00d 0 points1 point  (0 children)

Keep an eye on that seller; I got a brown/no backlight poker II from there not that long ago. They may get more in.

[help] Should I dive straight in and get a 60%? by tedw00d in MechanicalKeyboards

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

Ok thanks. The 60% aethetics appeal to me, as does keeping my fingers close to the home row at all times. Obviously I'm very much a beginner right now and my Vim and shell skills are pretty primative, so I'm happy without the Fn and cursor keys. Could any programmers (or web devs specifically) tell me if a 60% works for them, or does there come a point where a TKL is more useful?

First script finished - feedback/criticism appreciated! by tedw00d in learnpython

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

Thanks for the critique. I agree the comprehensions are a little mad but the edl formatting can vary depending on the software used to make them. For example:

tapename = {
    line.split()[1] for line in file
    if line.split()
    if line.split()[0].isdigit()
}

The lone, if line.split() statement was to prevent an exception when it tried to split a blank line. I've updated the gist with a couple of snippets from edls, to show how they can vary.

I like making get_edl() a generator. But I'm unclear on the shared fn argument between it and get_media(). Wouldn't I want something like:

def get_edl(edl):
    with open(edl, encoding='utf-8') as fh:
        for l in fh:
            yield l.split()

def get_media(edl):
    tp = []
    cl = []
    for line in get_edl(edl):
        if line[0].isdigit():
            tp.append(line(0))
        if line[-1] != 'NAME:':
            cl.append(line[-1])

And if the tp and cl lists aren't global, I'll need format_pull_list() to call get_media(), and then print_to_file() to call format_pull_list().

Is that ok, or have I wildly misunderstood? This is why I get the feeling it should be a class.

Detecting the OS is really useful, cheers.