« first day (1815 days earlier)      last day (3133 days later) » 

2:02 PM
Alternatively,
g=iter(hexlify(s));' '.join([''.join(t) for t in zip(g,g)])
 
Er, nope. That's the other way around. Didn't read closely enough.
It links to that first question as a dupe, but it really shouldn't.
 
@MorganThrapp Answers in that target do address the new question, though
 
I would have hammered as the second one if I spent a few more seconds thinking about it.
The first one does answer his question if he reads farther than the accepted answer, at least
 
@PM2Ring Yeah, but the second one is much more exhaustive.
The accepted answer, anyway.
 
2:10 PM
@MorganThrapp True. I'll link it via a comment.
 
It's bad that all dupes point to that question when it's asking the opposite half the time.
 
From the starred comments it appears some people had to deal with a rude questioner? :p
 
so how to change directory in terminal using python script? — Najeeb Choudhary 53 secs ago
"I know your answer says this is impossible. But how can I do it?"
5
reading_comprehension -= 100
 
I plotted a histogram of a data-set and fitted a Gaussian using python(leastsq, curve_fit). I got all the three parameters. Amplitude, mean, and standard deviation. But I don't find any error in the values. How do I get that?
can somebody help me in this regard
?
 
Thank you for the response kevin, the data is currently being output as a string so will take a bit of playing around with to see if I can get it in your nice form, I shall play with it and come back here later. Thank you. — CiaranH 57 secs ago
 
2:17 PM
What do you mean error?
 
This comment concerns me because the code I gave him works on strings.
If it didn't immediately work for him, with virtually no changes, then something is wrong
 
there should be some error for the mean
 
@MycrofD when using curve_fit you'll get two returns, the popt and pcov. The popt is your variables and the pcov is a matrix of covariances.
You can get the variance of each param by looking at the diagonal of pcov
 
ok, so the covariances are my errors for the parameters
and what about when i use "leastsq"?
 
No, that's not what I said.
I said you can get the variance of the parameters, there is a difference between variance and error.
 
2:20 PM
smile dances at the corner of Snape's mouth
 
I'd suggest you Google for the difference, if you're not clear on it.
 
@Kevin Yep. That's definite evidence of map-territory confusion.
 
stop using your magic in front of muggles :]
 
@Ffisegydd variance...its square root is standard deviation..that much i can find.
 
Magic is permitted in the Python room under the Darrin Stephens clause.
Both because of our close family-like ties, and the fact that we're so bumbling that no one would ever believe us.
 
2:23 PM
Thus everything is right with the world, for Kevin has reclaimed his destiny.
@MycrofD That is indeed correct. If you're happy with the std dev then great, but there's differences and subtleties involved here.
 
Maybe we shouldn't wear our tin foil hats when addressing the public
 
By the power of Greyskull! radical guitar lick
 
@Ffisegydd My query was about error in the determined parameters. How do I get them?
 
I've answered your question already.
 
the parameters determined for Gaussian fit were Amplitude, mean and std dev. those three values were shown in the matrix. But I want to know about errors in those three values. I didn't follow you.please give an extra hint
 
2:27 PM
I could not get the format to work correctly, it was formatting everything. But the hexlify does work, — CiaranH 54 secs ago
@PM2Ring, your hot tip got me an accept :-)
Adds an additional tally mark to "blood debts owed to Python room" board
 
@Kevin I have the power
 
@Kevin Excellent
 
We've got like thirty legendary swords in the closet by the potted plant, so there should be enough power for all the regulars
I wonder if the Eye of Thundera can let me see questions before they're posted...
 
@MycrofD Sorry, I've reached my daily quota of being nice.
brb
 
@MorganThrapp :facepalm: Of course, he could pass the output of a Python command to cd, eg cd "$(python -c "print '/'")". But I doubt that would be an acceptable solution.
 
2:31 PM
@Kevin Now we're talking - projects large cat symbol into the night sky
 
@Ffisegydd ok, thanks for helping
 
@PM2Ring Really? I would think that would still only work within the context of the Python interpreter.
 
@MorganThrapp It's running the cd command in the parent shell, though. It's just using Python to supply the directory name as a string.
 
@PM2Ring It doesn't work on Windows, maybe it does on Linux.
import subprocess
subprocess.call(['cd', r"C:\Temp"], shell=True)
Running that from the command line does nothing to the command line prompt (As I would expect).
 
Of course.
 
2:39 PM
Ohhh, I see what you're saying. I misread. Yeah, I don't think that's what he's looking for.
 
@MycrofD Here's a thought - you probably need to get yourself an MCVE together. In the process of doing so, to ask the question well, you're also going to want to demonstrate a good understanding of what the std dev. is. You need to ensure it's obvious that you understand the terminology e.g. errors and residuals. Lastly - get a good representative input data set, the output and the programming issue
With all that done, I reckon there are plenty of people knocking about on SO who'll be able to help you out.
 
Do you mind if I add that to my answer? I'll give you credit.
 
Maybe don't add it - it could confuse the OP
 
@PM2Ring Good point.
 
I was nearly going to mention it in a comment, but then decided to play it safe. There's no point making OP's more confused than they already are. :)
 
2:43 PM
Considering it took 4 comments of "You can't do this" for them to figure out "I can't do this", you're definitely right.
 
I wonder if every "I can't post a picture because I don't have rep" person has just never heard of image hosting services
Devil's advocate: "A cursory scan of the site rules indicate that we don't like posts that overly rely on off-site resources. Given the choice of uploading an image to a non-SO site, or posting only a textual description, OPs opt for the latter"
 
DSM
Late Monday morning cabbage for all.
 
cbg
 
cbg DSM
 
3:01 PM
@Kevin I saw a classic example the other day. Fortunately, the OP was convinced to post the text instead, but check out the original version
 
I remember that one :-)
Damn, Python List of Tuples (Find value with key + check if exist) is secretly one of those "I have to do it the dumb way because homework" questions
 
@Kevin why not implement a hash table?
I mean, it is pretty straightforward after all..
 
especially if you're allowed to use hash()!
 
exactly.
 
rhubarb
 
3:11 PM
rbrb PM
 
cbg
I'm interested in making a knowledge market that would function a lot like Stack Overflow.
...but I don't know where to start.
 
Actually, I've since learned of the existence of Twisted, and some of the hardware requirements I would need. So that's something...
...but not enough.
 
If you wish to make a knowledge market from scratch, you must first ask how on a knowledge market.
Chicken, meet egg
 
I always start with models. Design what data you need and how it's related.
 
3:18 PM
@QuestionC: Right on, man. Thanks!
(Or woman)
 
Then figure out how you want to interact with the data and write an api for that.
Then figure out how you want it to look, and design the frontend.
 
My model looks like:
[customers] ==money==> [my bank account]
 
I don't think Twisted is what you want though. It's for handling lower level protocols and interactions than making a web application.
 
Stackoverflow is the the 56th most popular site in the world. Worrying about hardware requirements is a happy problem.
 
@davidism: That makes a lot of sense. I just have to make sure I consult how the 'pros' do it, once I have my data needs defined.
 
3:20 PM
I wouldn't worry about that either. Do it how you do it. The pros have a completely different use case than you.
 
@davidism I've used Twisted with web applications, it works okay, but is usually kinda overkill
 
Trying to think about everything they do will just slow you down.
 
Next question: how to filter out facetious answers when asking SO how you can replace SO. "Make sure your site has autoplaying MIDI files and an 'under construction' gif"
 
@Kevin: [collect underpants] ==> ? ==> [Profit]
 
"Yes, but what is phase 2?"
 
3:21 PM
Facetious? I'd drop SO in a heartbeat for a 90's geocity page with the same content.
 
@davidism: That too is wise...hmmm...
Very helpful!
 
So sad. My pip won't work because I screwed up my path environment variable last week
 
Phase 2 is "poach Davidism for your site". Give him the ability to deliver electric shocks to people that ask poorly formed Flask questions.
 
I like how google is simultaneously the 1st, 10th, 18th, and 23rd top sites on Alexa
 
"How to acquire electric-shocking moderators" was actually next on my list!
 
3:24 PM
And 3rd and 15th if you count youtubes.
 
@QuestionC Throw in some ytmnd features too and you have the greatest site ever. I'd sign up.
I'd find it really enjoyable asking a question and attaching the bill cosby head bob gif with some techno on loop.
 
Is there a dupe for why won't jsonify work with a list?
 
Not that I am aware of
 
@davidism: I guess Django would be my choice then? I figured Twisted would help me learn more for my buck, and allow me the extra flexibility that Diango's alleged restriction to the HTTP protocol (whatever that is). I would ask you which I should use, but I guess I should define my data first. :-)
 
cbg all
 
3:29 PM
hey @vaultah
 
Why do you want to use Twisted though?
 
@corvid: Ignorance. :-/
 
I mean, it's probably overkill. Are you doing something special with sockets? I used Twisted on a robot that was communicating over the network. What's your webapp do?
 
Basically an open platform for sharing ideas.
The concept is, you'd be able to share any idea, and have people vet it, or support it, or contribute things from different disciplines you didn't even think about.
It could be anything. World peace, a new encryption algorithm, a new soufflé recipe, etc.
 
Oh okay web sockets might be useful for that but something like socket.io is probably more like what you're after
 
3:35 PM
Sounds like reddit if you focus on your third point
 
@Programmer: Sure, but with more focus on ideas.
 
@NoobSaibot it doesn't matter that Django is "restricted to http", you're writting an http application.
 
Kind of like how SO is anal about questions & answers.
 
And yes, Django, Flask, or Pyramid would all be valid choices.
"restricted to http" has to be the weirdest complaint I've heard about Django
 
@davidism: Not complaint! Lol
 
3:39 PM
What other protocols are there on web applications? I thought it was only HTTP really
 
https
 
That's what I mean, I don't know anything about this stuff.
It just came across as 'inflexible' to me.
 
@Programmer that's not a separate protocol
 
I thought it was considered a different one since you have to maintain session keys or something, right?
 
It's the exact same protocol, it's just over a secure connection.
 
DSM
3:45 PM
I know I say this about lots of things, but "restricted to http" sounds like it would be a good name for something.
 
a band name
 
beat me to it @Programmer
:P
 
There's a module called 'sockets' that is good for interfacing with web protocols other than http.
 
It's pretty good for interfacing with http as well. (In fact, it does.)
 
I need to bone up on my web infrastructure. I know there's seven-ish protocol layers, and that "packets" are a thing, but that's about it
 
3:50 PM
I only had one web course myself
 
user559633
@corvid websockets? i think you've even worked with these
 
I want to be prepared for when interviewers ask "what happens when I type google.com into my address bar and press Enter?"
 
I guess this was where I got all that from...
 
I use websockets all the time .-. and TCP sockets, it's most of what I do
@Kevin I was asked that question yesterday, it's so ambiguous... I think they're just looking for keywords like "HTTP request" and "DNS"
 
user559633
@Kevin just invoke Stallman and say "A corporation steals your freedoms!"
 
3:54 PM
But how do DNSes work
 
@Kevin Yeah, I have been asked that as well...I think it's a matter of seeing if you can get keywords, talk about DNS, proxy, HTTP. I think if you skip communicating about the OSI layers you wouldn't be axed..Unless you get an explicit question about it...then yeah. :P
 
DSM
It's all magic to me. Fortunately I almost never need to know anything related.
 
I don't trust interviewers to ask question that are only related to the actual job ;-)
 
I've had to work heavily with dns servers. It's not fun. There is nothing fun about it. It is just something you have to do to make things work....I want someone to explain to me why it is fun if they think so:P
 
@davidism: Actually, would you mind commenting on @stonemetal's post? Do you know what he's talking about?
 
user559633
3:57 PM
I've asked that question and I hate that question. Last time I was asked, I said "assuming DSL? Okay, sure" and walked them through which RJ-14 wires were used and then apologized that I didn't know the specifics of the PSTN modulation spec and that I couldn't go any further
 
Last question, I swear! Lol
 
@NoobSaibot that answer is fine, I don't see anything to comment on.
 
Hi am working with PYLINT, How much it will be used to improve the performance...
 
user559633
@Mathan 110% over 50 lines
 
@Kevin Finished the Resume updating?
 
3:59 PM
Nah, I've been dragging my feet, as is my custom for such things
 
Thank you Tristan:)
 
@davidism: This was the 'complaint' you were talking about earlier. But never mind. I guess everything's been said.
 
He's saying that if you application is more than just http request/response, you can use Twisted to run Django and other apps as one. Although I don't think that's particularly necessary, it's perfectly valid.
 
@tristan I'm impressed :-)
 
rbrb
 
4:01 PM
It's completely possible to run, for example, a websocket server alongside a Django app without using Twisted.
 
Ok. Thanks all!
 
user559633
@Kevin I used to be one of those guys that would drive to the colocation center, wire up one end, drive to the other end, wire stuff up there, then get the magic box that delivers pictures of butts working
 
user559633
I like "leaning in" on those questions
 
For maximum effect, place your hand on the interviewer's knee and don't break eye contact
 
user559633
calling her "my son" the entire time
4
 
DSM
4:05 PM
I don't think I'm going to participate in an interview with either of you. Ever.
 
The goal is to implicitly convince them that you invented the Internet, and possibly the concept of wires
A Unix beard may be useful here.
 
user559633
@DSM You have passed the first test. On to the drinking contest.
 
user559633
@Kevin That's in my "prior inventions and IP" document for when I started at my current company. No joke. The IP and ownership was very overreaching and when I complained that I couldn't sign it, my boss suggested that since it was a large company, just be thorough.
 
user559633
in a round about way, i stated that i had invented the internet (verbatim: "A platform for content curation and information retrieval based on user-input. ")
 
If Apple can get a patent for rounded rectangles...
 
DSM
4:09 PM
@tristan: we had a crazy "all your thoughts are belong to us" clause here too. I didn't want my operetta to become company property, so I insisted on replacing it by something saner.
 
user559633
@DSM I did the same thing and got a "well....we've always had people okay with it, so we're not changing it" and was quite pleased with the proposed and accepted workaround
 
user559633
I made a number of similarly vague and large claims, including having prior inventions that superceded everything that I'd be working on and what the company provides as a product. You make cars? I invented wheels and structures that allow humans to move without directly using their feet.
 
user559633
To the benefit of the company I work for, they were just like "yeah, okay, cool, whatever. we totally understand why you would want to protect yourself"
 
DSM
I seem to remember a story (probably not true, but sounded funny) where someone went the "Okay, but I experiment with writing viruses in my spare time to stress-test security protocols. If you own them, you're going to be responsible for them if one escapes the sandbox. You sure about this?" route.
 
user559633
 
user559633
4:13 PM
@DSM That's really clever
 
user559633
I'll have you know that I run a number of Furry-Retconned WW2 webrings. You sure that you want to own this?
 
Reminds me of the guy who signed a contract with his phone company, but not before striking out the late fee clauses with a pen. Apparently it held up in court.
 
That's genius!
 
DSM
@tristan: I'll have you know Maus won many awards..
 
He also added stuff like "attempts to charge me a late fee will incur a thousand dollar 'spurious fee' fee". That part did not hold up.
Related: how often are people sued for not putting "IANAL" in front of legal advice on the Internet?
 
user559633
4:18 PM
@Kevin Worst I ROBOT prequel ever
 
@tristan Yeah it's not a great film, but it establishes that Asimov's works fit into the SOPythonVerse mythos by way of buttbot
 
welcome @BDD
 
4:33 PM
Should I tell this guy not to use string as a variable name? It isn't a built-in variable, but it still seems... Non-idiomatic
 
It's the name of a module, so - up to you if you want to tell him.
 
ehh, I guess it's fine.
 
user559633
for some reason it reminds me of why they had to call it windows 10 and not 9
 
if version.startswith("Windows 9"): raise Exception("Sorry, Windows 95 and 98 are not supported")
 
user559633
@Kevin and because windows 8 was so bad they wanted to give the stink lines some air to dissipate
 
user559633
4:40 PM
comedy option, microsoft knows they make a crappy product and were trying to leverage OS X's brand value
 
user559633
 
user559633
of the software world
 
Using "string" as a variable name isn't a perilous mistake. It does say you probably aren't aware of the string module, as we tend to avoid using module names as variable names, whether in the namespace or not. So it just says, "Noob here."
 
My only real objection is that variable names should reflect their purpose. name = input("Enter your name") is better than string = input("Enter your name")
 
on a related note, I skipped breakfast, and now I'm skipping lunch.
 
4:45 PM
But OTOH if that was my only reservation, then I wouldn't have a problem using string if it was the parameter for a function that can operate on any string. Ex. def is_palindrome(string):
But in reality I would use s as the parameter name. I like single letter vars for truly "generic" operations.
 
I like a_string for generic strings.
 
Hello all
 
@becko hello
 
I banish this conversation to the land of wind and spirits
 
4:52 PM
@Kevin @AaronHall And when is it ok to post a question here?
 
optimal to wait 48 hours
the longer the better.
Feel free to read the rules if you want to follow the letter of the law and not the spirit... :)
 
"two days" is the usual recommended time period but you can go lower if the ROs are feeling merciful
 
DSM
Esp. because anyone in the room who's interested in a tag (e.g. scipy) will be following it anyhow.
 
Yeah, I saw the question prior, but could not answer it because I have zero experience with c++/Python intercommunication.
The whole concept makes my head hurt.
 
@Kevin and where can I find the rules?
 
@becko In the link posted on yonder corner >>>
 
  File "just.py", line 3, in <module>
    importlib.__import__('../templates/test', fromlist=[''])
  File "<frozen importlib._bootstrap>", line 2334, in __import__
  ...
ImportError: No module named '.'
 
And also what vaultah said
 
sigh, how exactly do I import a module from a directory in the parent directory?
 
The hacky way is to append the parent directory to sys.path
 
4:56 PM
I know about that one, but I don't want to pollute sys path
 
Pretty sure I do that a couple times in KevinScript -_-
 
I have summarized the rules thusly: "Rules: 1) Be nice 2) Don't link to recently asked questions, ask to ask/preamble or if someone knows something, or @ping someone you don't know 3) indent your code 4) Have fun & be respectable 5) Read the chat faq: chat.stackoverflow.com/faq "
 
You could append the parent dir to sys.path, do the import, and then remove the item from sys.path :-D
 
hahaha_no.gif
I used the imp module in the past to do it, but docs say it is under gradual deprecation and I don't wanna lose my sanity using it
 
relative imports is on my big list of things I don't understand, right between "calling Python code from other languages" and "anything to do with Unicode"
 
4:59 PM
What exactly is the reasoning behind Python making it so freaking difficult to import an innocent little module with a relative path?
 
cbg
 
0
Q: Python imports relative path

ascenatorI've got a project where I would like to use some python classes located in other directories. Example structure: /dir +../subdirA +../subdirB +../mydir The absolute path varies, because this project is run on different machines. When my python file with MySampleClass located in /mydir is...

?
 
@AwalGarg what version of Python are you using?
 
@vaultah 3.4
> then as long as dir is in the sys path
 
5:03 PM
Yes. That link is now open on 4 different tabs. I think I need some sleep.
 
@AwalGarg Well, "No" is technically an answer.
 
Maybe, but I'd still like to know why Python doesn't expose a simple way to do complex relative imports.
 
Does anyone know if there's a service for scheduling SMS messages to go out at a certain time?
 
Plivo?
 
I'm channeling my inner language developer... "If something is difficult, you must be doing it wrong. We made imports work this way so 'incorrect' project layouts would be discouraged"
When asked what the 'correct' project layout would be, the inner language developer could not be reached for comment
 
5:09 PM
here is my project layout:
awal@bookstro:~/Documents/myApps/nginx-lm$ ls -R
.:
readme.md  src  templates

./src:
actions.py  app.py  confighelpers.py  constants.py  just.py  nlm.py  template.py

./templates:
test.py
 
to piggy back on Kevin's comment, in order to avoid having to deal with relative imports (because it does add a level of complexity that imho should not be there), chose what your execution path is and import with respect to that.
 
cwd shall be /src/
 
fire drill. brb if my comp doesn't melt
 
Git push first!! :p
 
RIP KevinScript
 
DSM
5:14 PM
Good point. Kevin should write (decree?) a policy for what happens to KS if something.. unfortunate.. should happen to him.
 
And on the day of fire Kevin said: "let there be git"
 
Have it sold to Apple so they can advertise it under their name as "KS: copying Python and JS - reinvented".
 
Speaking of git. I'm pretty grateful to rogerdudler.github.io/git-guide right now. Git's confusing.
 
Yes!! It was definitely more enjoyable than this jwiegley.github.io/git-from-the-bottom-up (for the record I did really enjoy that read)
 
Do not link your recent (< 1-2 days) questions in the room. (rules)
 
5:23 PM
KevinScript has a bus factor of 1 by design
Bury me with my programs
 
@Sajeetharan hi, if you're new then welcome and please read the room rules :)
 
DSM
@Kevin: so be it. We'll read out some needlessly complicated monadic fixed point combinator code at the memorial in your honour.
 
Yes, this pleases me.
 
user559633
@idjaw i'd agree with your statement about relative imports, except everything is always relative to something else and python project base directories should be available for import logic
 
user559633
 
@DSM why?
Or another one?
(That may work better as a spoken joke)
 
(Don't get me wrong btw, I really like python. Just this super weird "limitation" irks me)
 
DSM
(@RobertGrant: yeah, until you said "spoken" I missed the joke entirely. :-)
 
user559633
@AwalGarg Python 3 relative import works the way that it should, even though it may not seem that way at first. Unless you're Dutch, at which point the official point of view will be that it's apparent at first.
 
5:34 PM
Yeah I think Python 3 apes Holland's import regulations
 
@tristan Correct. What I was trying to convey was to make the imports relative from a single point. That single point being where the code will run from. It would make it easier to manage.
 
user559633
@idjaw Which code. The main script that you expect to call the other imported modules from? That's done in python 2. Relative to some other point? That's done in python 3.
 
OK. I was missing that key piece from Python 3. Thanks for clarifying @tristan.
 
user559633
No problem. I bring this up because I spent a couple days saying "what the hell Python?" back when I was on Python 2 and want to keep others that I don't dislike from wasting their lives
 
5:38 PM
@vaultah the OP posted the code
wow it works :p
 
@tristan I am still not exactly sure how python 3 does that. Am I missing something obvious?
 
All relative imports in py3k have to be explicit and the parent module must be loaded before performing relative import
 
say the current working dir is / and / contains foo/ and bar/. How can a file in foo/ import a file from bar/?
 
user559633
 
@AwalGarg import ..bar.file should probably work
 
5:41 PM
@vaultah python 3.4 reports that as a syntax error (which sounds ok). But changing that to from ..bar.file import something says SystemError: Parent module '' not loaded, cannot perform relative import.
 
Oops :c Try from ..bar import file
This means you are running a module inside the package as a script. Only run scripts from outside the package. — Martijn Pieters ♦ Jun 7 '13 at 10:27
 
user559633
When in doubt, remember that computers are stupid. If you write code and test it from one context, then change the context, the computer cannot track that.
 
user559633
More directly, trace your imports from the point of view of the calling module and keep in mind that when you import code, you're telling the python to run that code.
 
DSM
@MartijnPieters: one obvious way, eh? :-)
 
@vaultah AHH, that is what I was missing since the past hour
 
5:48 PM
@vaultah I got bored and decided to write OPs function as a ternary.
def find(haystack, needle):
    return -1 if (0 in (len(haystack), len(needle))) else len(haystack) - len(needle) if haystack.endswith(needle) else find(haystack[:-1], needle)

print(find('0123456789', '9'))
 
Thanks @vaultah @tristan :) I think I understand the idea now
 
user559633
@AwalGarg No worries. It's pretty frustrating to deal with until it just "clicks"
 
user559633
And where Python is so easy and friendly, it can be jarring
 
@DSM: well, I found two, both obvious. :-P
 
DSM
To be fair, up until just a few seconds ago your first didn't even yield. :-) But now that mine doesn't add anything that yours doesn't, I'll delete it.
 
5:56 PM
Alright, sorry for being a vamp. Last question for tonight and I leave for bed:
I have `PYTHONDONTWRITEBYTECODE="screwPEP8"` in my current user's env. I _apparently_ have it in the root user's env as well (I put it in `root/.bashrc` as an export). When I do `python something`, bytecode isn't written, but doing `sudo python something` creates bytecode. Any ideas how I can go about tracing the root of this?
 
@DSM Yup, dumb little mistake. And the any() test in the other version used the wrong test; I was raising the exception if any of the iterables were exhausted, rather than still had values left. That was going to happen always. :-D
 
user559633
@AwalGarg Why are you doing this?
 
Preventing the creation of bytecode? I dunno. Looks saner, I guess.
 
user559633
Also, unless you pull in the "sudo-up" user's env on the sudo command, the sudo session isn't invoked with the environment
 
user559633
@AwalGarg lol
 
5:58 PM
those __pycache__ entries in ls output is sooo ugly
 
user559633
If you were within driving distance, I'd fill a squirt bottle with water, come find you, then say "No!" firmly and loudly while squirting you with water.
 
hehe, why?
 
Reminds me of the old story "I deleted all the extensions from the filenames in the C:/Windows directory because I think it looks cleaner"
 
lmao
 
user559633
@AwalGarg What do you think the purpose of bytecode is
 
6:00 PM
Avoid unnecessary recompilation
 
user559633
@AwalGarg That's not how that works.
 
oh, then?
 
user559633
This is an equivalent to a non-mechanic going into his engine and removing parts and then driving slowly down the road while thinking to himself "wow, why did the manufacturer make the car heavier than it needs to be"
 
hahahahaha
 
"If I remove my Python interpreter, my script finishes a lot quicker. Why is that?"
 
user559633
6:02 PM
If Python sees a .pyc file and it's newer or the same age as the .py equivalent, it won't recompile.
 
user559633
Further, bytecode compilation happens very quickly, save for being on a very slow computer or having a very, very large project.
 
@tristan well doesn't that evaluate to "avoiding unnecessary recompilation"?
 
user559633
You're basically enabling debugging options that will slow down behaviors while thinking you're making things faster.
 
umm, no. Sorry I didn't mean that. I only want to disable it for development. I do understand that it will slow down stuff.
 
Have you measured how much time it saves you disabling this?
Bearing in mind that as Tristan says, only modified files are recompiled
 
user559633
6:05 PM
I have to get back to work, but here's well-meaning advice that I'm saying in a friendly tone: stop fucking with environment variables that begin with PYTHON until you know enough about Python's behaviors that you could write a book about it and sell it on Amazon.
 
rhubarb all
 
user559633
take care vaultah
 
@AwalGarg Seriously. There's no point in disabling bytecode. At all. It saves you nothing and slows you down.
 
@AwalGarg Relevant:
http://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo
 
Psychic debugging: he wants to prevent .pyc files from being created because they gum up his source control system with relatively large file sizes.
Preferred solution: add *.pyc to your .gitignore file or equivalent
 
user559633
6:08 PM
Irrelevant:
 
Also, don't take our word on the Bytecode stuff. Mess around with it and see what you get.
 
user559633
 
tee hee
 
Your catte has a melon, my argument is invalid
 
user559633
 
user559633
6:10 PM
okay, f'reals, back to work. may your requirements.txt always be versioned
 
amen
Thanks for catching that very silly silly of mine @MartijnPieters ....kicking myself hard...and thanks for deleting :P
 
6:35 PM
Anyone tried using LiveServerTestCase with flask-testing, so it spins up a server for use in Selenium or whatever? I get a weird error that doesn't look entirely relevant. Slightly embarrassing to have to ask how to start a server; just wondered if anyone's seen this before. If not no probs, I can always just start the thing in a script.
 
If only Davidism were here
 
Thankfully I also loaded the same message into an astromech droid on a ship that's being captured. It'll probably reach him.
 

« first day (1815 days earlier)      last day (3133 days later) »