Well... Communications still hasn't officially approved my talk, but talks like they will when I give them a "final" copy of my slides tomorrow morning.
Oh, I broke someone's production last night due to our code residing in a timestamped DB allowing applications to run off of a timestamp (code as of a certain datetime) and some of the code is actually not timestamped so that config changes can be picked up immediately.
Speaking of doing it by the book, our book is changing. The current VPN is Cisco; but they are changing to Fortinet. They want me to bring in my home computer so they can have their way with it.
Right now I Cisco VPN into work, and can access subversion and internal websites, and can then SSH into my box (actually, several different boxes, if I care).
The IT guy told me that all the intrusions have been traced back to personal devices. He didn't bother to tell me the OSes. He also didn't discuss the unknown unknowns.
I kinda wish I could link up with our security people and get permission to try to hack us from the outside, just for the experience. But I've got too many extracurriculars already.
It's silly. I've been slogging through leftovers, answering questions all night with no rep, and I just happened to be the first one on a question 3 minutes ago, and got 3 upvotes...
Frankly, I'd have a hard time justifying a move to either the Bay Area or New York for the top money shown, because of the cost of living. I'm sure some get more, though.
We had been looking in Manhattan for a place, almost taking one, but then we started walking around near downtown Brooklyn, and jumped at a one bedroom slightly less than 3k a month.
Hey so im making a mario clone in pygame and I was reading about command patterns. And in my mario game all objects that are drawn to the screen have an update function (an abstract method defined in their base class), and some of objects redefine their update function in their own class. My question is, would using command patterns in this situation be good?
With command patterns, I believe me goal is to be able to loop through a list of all the objects and call update on each of them. But if each of them takes different parameters, how can I do this?
I used to play the guitar much more regularly. Then I got married to a violinist snob. Since she can't find anyone to play for free at her Fake wedding expo, suddenly I'm not so much of a musical liability.
Plus it's a small freaking world. She got hired for a gig. The guy asked her to find another person. She called two of her friends, and gave it to the first one who called her back. Then the other one called her and claimed she was already hired by the same guy, and then contacted the guy and got canceled (so I guess she wasn't really hired.)
As far as who makes money. Just google "long tail." I'm sure the results will be right.
The band dues are $50/month, but we play four free concerts a year, and a few of us kick in a few hundred more each to make it possible -- insurance, printing, buying music, venues.
My wife's played like 6 times this year for Wicked as a sub. She's the real deal. But no way could she make it on her own just playing music with the amount of work she's getting. I don't know what to tell her. But she needs more regular work.
We saw Kristen Chenoweth in San Antonio about a year ago. It was amusing seeing all her gay followers among all the rubes that were completely clueless about some of the innuendo. Most of it wasn't really my sort of music, but it made my wife happy and the venue was fantastic.
New York is certainly someplace we'd consider if the conditions were right. But those conditions don't include the kind of money on that chart. My wife's never worked, so it's hard to imagine she'd be contributing much to the budget.
Well she might get work as an executive assistant or something like that, and with your experience, I doubt you'd be waiting for a job. I'd probably find you something fast where I work.
I made a friend at church, and I told him all about my meetups and projects I was working on, and he told me about what his firm was doing with Python, which got me really excited and I told him I'd love to work with him, I told him when I got hired at a couple of business schools as an adjunct, and when one of them let me go, he got me on his team reporting to him.
Networking is key. I haven't had a "serious" (e.g. needing to get past the HR gatekeepers) interview in approximately 20 years.
Don't get me wrong -- they've been serious technically, but based on the perceived needs of the interviewing future co-workers, rather than just buzzword bingo.
Wow, that off-the-cuff answer (that I later expanded a bit) is up to 60 points of rep -- it's my second-highest ranked answer. The 8 questions I answered tonight before it are all still sitting at zero, even though I have the only answer on 7 of them. Some of those might hit tonight, though, I suppose.
My wife would probably look askance at that, but she goes along to get along. I do pride myself on refusing one job on moral grounds -- at the little company I worked for, they laid off the entire company, and work was scarce, and the first offer I got was improving predictive-calling algorithms.
One of my specialities is partitioning hardware and software and making things go fast. Although with graphics coprocessors as fast as they are these days, FPGAs are probably not as important, at least until the Intel/Altera marriage bears serious fruit.
Ah, I see, it's in the comments. My take on it would be searching for the groups of stones and counting "liberties" (i.e. free intersections next to the group).
If there are no liberties left, the whole group is captured.
+ remember that it's not allowed to kill your own group and, the last one, the rule of "ko".
the hardest thing would be grouping the stones together; maybe, search in depth would work, and, if you maintain groups as the game goes, you don't have to do it after each turn.
This is an unabashed yes. When one uses ssh to execute a command on a remote server it performs some kind of fancy internal input/output redirection. In fact, I find this to be one of the subtly nicer features of OpenSSH. Specifically, if you use ssh to execute an arbitrary command on a remote sy...
@kiran Depends what you mean by "run on" and "copy." There's no way to execute code of any kind without it being present on the machine that runs it, but @tuomur's answer indicates there are ways to communicate the results of remotely run processes.
@kiran well, I'm presuming you want the interpreter to run on a local machine? So the code has to be available to the interpreter somehow. You could use a remote-mounted filesystem like NFS, but loading a file from an NFS filesystem counts as "copying" it, in my book. Maybe I'm being too picky.
What is the use case that gave rise to this requirement?
I have a script in my local machine which should run on server as it is accessing folder structure of server machine but I don't wan't to copy it on the server side
I meant writing the script source to remote interpreter's stdin like cat helloworld.py | ssh remotehost "python -". Assuming it is just a one script file.
I'd use something like Fabric instead if possible.
@tuomur cat helloworld.py | ssh remotehost "python -" is not working for me..it is saying helloworld.py is not exist though it is present locally..can u help me with this
@davidism But when I try that within PyCharm's command line (on a Windows machine, supposedly running a venv), it doesn't recognise pip as being valid.
@kiran Good. So now use the up-arrow to repeat the same command, and at the end add | ssh remotehost "python -" - but substitute the real hostname for "remotehost"
If you want to do any serious data analysis and visualization, R has the most "natural" structures. While Pandas is catching up in terms of implementing data.frames, it's not there yet.
In addition, there are a lot of packages that enable visualizing data using javascript and other resources (i.e. Bokeh).
@RomanLuštrik thanks for the valuable information :) and I to agree that r is good in data analysis just wanted to know if python capable of doing that but from you view it is clear that certain tasks still run better in r
You can probably come close with what R and Python can do. Everything else is syntactic sugar and bitterness. I will admit I despise Python's native structures for data analysis (i.e. no data.frames)).
That's why you have pandas working with numpy arrays :p
Although, pandas might be extinct soon, as they're spending far too much time doing numeric analysis and not bothering to procreate... might have to train some other creatures at some point :p
It's a bit unfair to compare the native data structures of a general purpose scripting language and a statistical programming environment and conclude that the former is broken because it isn't the latter. It's not supposed to be!
@Roman but at the same time, I can scrape the web, parse tables and analysis them, then construct a database, generate pdf documents and html then serve them from a local webserver in one language - keeping the same syntax and style, rather than context switching all the time :p
@JonClements Every language has its merits. R is good for data visualization and modeling (as atested for by 7000 packages in the official repository). When it comes to what you said, it's still doable, but probably not as 'natively'.
Sometimes I love SO, answering a question about colorbar of matplotlib, lead me to dig into it's base (ColorbarBase) and now I want to change all my plot code to use that instead :P
@IntrepidBrit Could be cross compiler issues. Any C code will need to have been compiled with Visual Studio. If it's a standard-ish library - look for a wheel on Gohlke's page. If it's your own.......
I know what you mean. But hey, I'd rather someone make me re-check the basics and sorted the problem early on that me haring off down some obscure route
Yesterday I made a post about putting a reviewer's stats when the Improve or Reject and Edit. That post is about including the information. This post is about the information shown being '0' or being wrong.
I did some more reviewing of suggested edits and found this:
This is obviously wrong, ...
@IntrepidBrit All just works for me :( Pasted command prompt session here dpaste.com/0Q5XAJJ Shows pygame not installed, installation of wheel and then it is installed. 3.4 32 bit
Am I missing something or does "If your intention is for a given key you want to keep appending values in a list, you should look at collections.defaultdict" make no sense?
Cabbage all, I got a little question, I got this formula : viscositeit = (pi*(viscositeit_d**4)* differentialPressure) / (coriolisMassFlow* viscositeit_constante * L) somethimes the differentialPressure or coriolisMassFlow = 0. then I get a ZeroDivisionError. When I get this error I want the function to return 0 and not a error. How can I catch that error?
@BasJansen Thx for response. Oke done that, but when it doenst give a error I want it to return the viscositeit. Can I use "else" for that? like try: {code} except ZerroDivisionError: return 0 else: return viscositeit?
@SuperBiasedMan Looks grammatically correct to me but not particularly clear. "want to" are usually part of the same verb phrase, but they're actually separate here. "a given key you want" is all one noun group. Removing the redundancy, it reads "If you want a key to keep appending values in a list..."
no worries ;) Also, one of these days I will learn how to do a new line in this chat without sending a message so that I can write correctly indented tiny snippets here
I guess it was extra confusing for me because the context was someone asking what happened when they tried to use the same key for a dictionary twice ie. hash_eg[10]= "name1" hash_eg[10]= "name2"
Which is... sorta the opposite of using a defaultdict. But I think they might have been suggesting adding an empty list to which you can append multiple values.
@BasJansen I agree that it's good design to only have one exit point in a function, but I won't agree that you should never use a return statement inside the function body. And neither does Guido, otherwise it would be a syntax error. :) Sure, try to design your functions so they have a single return at the end, but if the code is cleaner with multiple returns, then do it! One classic legitimate use case for this pattern is when you need to break out of a nested loop.
I do recall one user asking one of the mods (I think it was Anna Lear) to suspend him because he was spending too much time and had to finish his A levels. Maybe this was him
@corvid Agreed. Comparing time strings is silly, but fortunately, time strings created by strftime('%H:%M') do behave sensibly when compared, since the hour field will always contain 2 digits. It's still silly, though. :)
@corvid Usually. But in this case, I think using the local time is ok, as they want to increment the pickup date if the time the order was placed is after 2PM local time. However, the question isn't very clear, and I'm thinking of cv'ing if the OP doesn't reply soon to my comment about the format of pickup_date.
I know a classic example of Bad Things that happened when a C programmer used localtime instead of gmtime. Their code controlled the operation of equipment at a brewery which ran 24/7. The program turned on the tap to fill a rather large vat with water at 2AM, as usual, and various other ingredients were added. Then an hour later Daylight Saving Time finished and so it was 2AM again. So the tap got turned on again, and there was soon a big mess on the brewery floor.
Imagine having a pacemaker that measures your heart rate and delivers a shock when it gets too low. On the night that the clocks spring forward, it notices that there are no heart beats recorded for 2 AM to 3 AM! Uh oh. Better deliver one hell of a shock!
@BasJansen To be fair, the small amount of RAM in those days meant that you often had to resort to really ugly coding tricks. But yeah, a lot of C64 code was uglier than it needed to be.
I think it was because with the introduction of affordable home computers, a lot of people wanted to try programming which lead to a huge increase in 'I can into programming' type people
compared to the extremely limited number of people having access to computers before via their university or what not
Per this answer, do we have some consensus on line breaking around if/and in a long ternary? PEP-8 says after for and/or, but that doesn't look right with the conditionals.
I assume life-critical programming has so much regulation that it becomes safe merely by virtue of repelling 99% of programmers from the industry, leaving only the super-dedicated.
If you're about to say, "no, programmers in the medical industry are about as lazy and incompetent as anywhere else", consider not saying that so I can live in peaceful ignorance
@jonrsharpe IMHO it makes sense to do what your code does and put the line break before the if / else of a conditional expression. OTOH, that's a pretty hairy while condition, so it's going to slow down any reader no matter how you format it. :)
Per the equivalent Python version linked from the docs: code.activestate.com/recipes/576693"Big-O running times for all methods are the same as for regular dictionaries."