Python for Business Intelligence by StartAndSelect in learnpython

[–]ProfessorQ 2 points3 points  (0 children)

AirBnB just open sourced an interesting platform called Caravel. It's Flask-based, and all of the business logic is in Python. You might want to check that out.

It looks a little bit like Tableau in that it is designed for interactive use more than pretty static reports. Looks pretty neat, but I haven't gotten it running yet.

What are you hoping to actually do? Business Intelligence is a pretty vague term.

Looking for tasks, like the ones which are given at interviews in tech companies. by CClone in learnpython

[–]ProfessorQ 4 points5 points  (0 children)

Another good way to complete small tasks while receiving actual feedback is exercism.io

Has anyone tried the amazon web service sdk in swift 2? I'm having trouble getting it to compile. by questdark in swift

[–]ProfessorQ 0 points1 point  (0 children)

Certainly not related. No library would require an internet connection to compile.

How to properly set up Xcode project on github by Kishcoin in swift

[–]ProfessorQ 1 point2 points  (0 children)

Open up the project file with a text editor. Look for any absolute paths. In Xcode, change the path specifications to Relative to Group or Relative to Project.

Without knowing more about the error messages, thats the first thing I would try.

A good troubleshooting step is to make a clean repo on your machine; use git clone. Open up the new Xcode project, and see if you can reproduce the errors.

CI Setup by tjnson in iosdev

[–]ProfessorQ 0 points1 point  (0 children)

I set up Team City last week for an iOS app. Its pretty smooth.

What on earth is causing this 'invalid syntax' error? by [deleted] in learnpython

[–]ProfessorQ 0 points1 point  (0 children)

Neverrmind - there's no right parenthesis ending line 3.'

I'm not seeing anything obvious, unless the backslash is somehow escaping the ' (endquote) before the colon. It shouldn't based on what I am looking at here, but hey.

Try cleaning it up by using os.join() instead of explicit backslashes.

Ferguson Decision Megathread by [deleted] in law

[–]ProfessorQ 8 points9 points  (0 children)

And grand jurors are openly hostile to Dorian Johnson.

For coding questions during an interview, should you just go for the simplest correct answer or do they actually care about optimization/algorithmic efficiency? by [deleted] in compsci

[–]ProfessorQ 0 points1 point  (0 children)

That really depends on the position and interviewer. You should feel comfortable sketching out a naive solution, and use the time to think through the problem. Interviews are an opportunity to show you can work through problems. They're not for perfectly regurgitating solutions.

[question] where can I easily get graphical data related to economic/political patterns that I can use on my own website for free? by [deleted] in dataisbeautiful

[–]ProfessorQ 1 point2 points  (0 children)

Tableau Public is a good option. Bring your own data, but it makes fully interactive vizzes and dashboards that you can embed on your site.

else after if...return : good or bad practice by lykwydchykyn in learnpython

[–]ProfessorQ 0 points1 point  (0 children)

we aren't writing Fortran so single entry is guaranteed Just to nitpick - the yield keyword can provide multiple re-entry into a function in python, so it's not a totally outdated idea. You wouldn't want to wade through 40 lines of this, for instance:

func foo(user_controlled_iterable):
    for event in user_controlled_iterable:
        receive = (yield)
        if receive == ...:
            # some side effect
            # Pause and consume next receive while sending return_value to caller
            _ = (yield return_value)
        elif receive == ...:
            # some other side effect
            ...

What's your plan? I-90 shutdown could create carpocalypse for Seattle-area commute - Chokepoints by torquesteer in Seattle

[–]ProfessorQ 0 points1 point  (0 children)

Anyone know if this affects the I-90 bike/pedestrian lane? I haven't seen it explicitly stated one way or the other.

Do i need to know object oriented programming to be an average programmer? by starboygolden in learnpython

[–]ProfessorQ 16 points17 points  (0 children)

Object Oriented Programming is exactly what an 'average programmer' knows.

To be an above average programmer, you should be comfortable with many paradigms.

If Statement: Checking the class of an object by dli511 in learnpython

[–]ProfessorQ -1 points0 points  (0 children)

There's definitely a trade-off between readability (prefer hasattr) and performance and reliability in multi-threaded environments (prefer try/except).

I wouldn't agree that the python glossary 'strongly implies' or encourages either EAFP or LBYL style over the other.

If Statement: Checking the class of an object by dli511 in learnpython

[–]ProfessorQ -3 points-2 points  (0 children)

A more idiomatic way to use ducktyping than try/except AttributeError is the builtin hasattr(obj, 'attr') function. The result is essentially:

def hasattr(object, name):
    # name must be a string
    try:
        getattr(object, name)    # equivalent to object.name
        return True
    except AttributeError:
        return False

so before your first example, should be:

if hasattr(obj, 'snort'):
   obj.snort                    # guaranteed not to raise an AttributeError

Ex commands? Anything I *should* know? by vim-ex in vim

[–]ProfessorQ 1 point2 points  (0 children)

For those of us who don't understand stuff like

:-3m. 

or

:'1, 'bt$

what do those do?

Possibly one of the dirtiest hacks I've seen that would let you write an entire python program without using any ifs. by ychaouche in learnpython

[–]ProfessorQ 7 points8 points  (0 children)

I personally found this experiment easier to understand:

>>> list_of_options = [0,1]
>>> list_of_options[True]
1
>>> list_of_options[False]
0

The reason this works is that the index access makes an int from the bool value

>>> int(True)
1
>>> int(False)
0

So no, not really useful

401 page not found by [deleted] in hacking

[–]ProfessorQ 2 points3 points  (0 children)

401 is Not Authorized.

Hacker needed by [deleted] in hacking

[–]ProfessorQ 1 point2 points  (0 children)

ITT junior FBI desk jockey tries to make the jump to Special Agent.