« first day (1965 days earlier)      last day (2983 days later) » 

user559633
2:00 PM
@MartijnPieters I made it :)
 
Well unlike the rest of python, I've yet to figure out how to test if my type hinting is actually correct. But guess it's off to SO again.
 
Yay me for calling your creations 'dopey'! :-D
 
user559633
also, if you're interested, here's the highest quality version of it I could find: raw.githubusercontent.com/tristanfisher/…
 
@Kevin You silly python 2 user!
 
user559633
@MartijnPieters haha, no worries. i meant it as a pixel art version of the joke certificate i made in "computering"
 
2:01 PM
I love the new icon.
 
user559633
@MorganThrapp oh cheers :) i wish i drew it with the head totally in frame as now i'm too lazy to go back and fix it
 
I actually kinda like that it cuts off. :P
 
user559633
yeah -- it had to be recognizable at smaller than 32x32px for that minefield multiplayer game
 
It adds personality.
 
I like my icon.
I designed it when I was like 15.
damn that was a long time ago
 
2:06 PM
@tristan I think it's good
 
Man, people need to learn to search. I found the dupe for the numpy c_ question in milliseconds when I typed in numpy c_ into google.
 
Math question, why isn't it possible to do a factorial on a negative number? (IE: multiply that number by each natural number between itself and 0)
 
user559633
@MartijnPieters they come here for the needful
 
I mean, I'm no numpy expert, and even I could quickly find that one.
 
@MartijnPieters I think there could certainly be an improvement in the "similar questions" algorithm that it suggests while creating a question.
 
2:12 PM
@InbarRose and the dupe search algorithm. I've made concrete proposals on Meta before.
 
I remember discussing it with someone here years ago, could have been you - but specifically I also remember a proposal that new askers (under a certain amount of questions, not rep) have a special pop-up while creating questions to help prevent redundant/dupe questions, like a "ask a question wizard" that asks you questions and suggests possible answers already.
(Of course, the wizard would be skip-able)
 
@InbarRose Because most definitions of factorial don't account for the possibility.
"N! = (capital pi with an n over it and "k=1" below it) k" won't accept negative numbers because the capital pi product notation requires the upper bound to be higher than the lower bound.
And "n! = {1 if n = 0; (n-1)! * n otherwise}" will never terminate unless n is positive.
 
So basically just abs() the number and then give it a negative sign if it's odd?
 
The factorial of negative numbers can be calculated when looking at the more generic function.
 
You could create your own definition that says "N! = (capital pi with max(n, 1) over it and "k=min(n,1)" below it) k" which would work fine, but it's excessively wordy for most practical applications
 
2:21 PM
The "gamma function" is defined for the whole set of real numbers - not only the natural numbers (plus zero)
 
Or, hang on, that wouldn't work because then you'd multiply by zero.
n! = {
    1 if n = 0;
    (n-1)! * n if n > 0;
    (n+1)! * n if n < 0
}
 
-.-
Just use the gamma function already, it's kind of a standard function everyone knows.
 
cool
Another silly question, just because it's bugging me.
>>> def add_ten_percent(number):
	return int(int(number) * 1.1)  # number is a string

>>> add_ten_percent('100')
110
 
For certain definitions of "everyone" ;-)
 
Anyway to make the int(int(number) * 1.1) more elegant?
I don't like calling int() twice.
 
2:23 PM
Yeah, don't store numbers as strings in the first place and do return int(number*1.1)
 
@Kevin Of course, but it's input from somewhere else. This is just an example.
 
convert the input to an int as soon as possible, so all of your arithmetical steps are performed on a sensible type. This is a similar principle to the one people suggest when manipulating text - "convert to unicode as soon as possible, only encoding and decoding to something else at the I/O endpoints of your program"
>>> math.gamma(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: math domain error
This surprises me.
 
Well that's obvious - since the gamma of integer negative numbers is +/- infinity
 
@InbarRose - you won't get a lot of sympathy here for Python not treating numeric strings like integers. If you entered "100" + 1, should the "100" be converted to an int and give 101, or should the 1 be converted to a string and give "1001"?
 
2:29 PM
It follows from the better definition:
 
@PaulMcGuire Haha, Don't worry, I know :) I am just asking about not calling int() twice.
 
When Inbar was asking how to do the factorial of negative numbers, I assumed he wanted it to work on negative integers. Maybe I'm assuming too much.
 
@Kevin You were right.
But I will just factorial(abs(n)) and then * -1 if it's odd and negative.
 
The set of negative integers is much smaller than the set of negative reals, so from a statistical standpoint, gamma on a randomly chosen negative will almost always return a coherent value :-P
 
@InbarRose Well quite frankly there exist no number that satisfies this.
since any number won't fullfill the criteria: f(n+1) = n*f(n) with f(1) = 1
 
2:31 PM
Since you are getting a string representation of "100", you'll have to call int() somewhere for that. And then since you want the 10% adder to be truncated to an int, you'll need to call int() somewhere else for that. You might be able to move them around so they aren't in that one line, but they will still be there, somewhere.
@Kevin's advice was best - if you get "100" and want it used as an integer, do the conversion as quickly as you can, then forget that it ever was a string - that is just an artifact of your interface.
 
@PaulMcGuire Thanks. But the reason is because after the multiplication with 1.1 it returns a float.
 
There's also an argument here to keep it as a float, only truncating the fractional part when you display the data. But that depends strongly on the use-case.
 
That is one reason why I put parse actions (parse-time callbacks) into Pyparsing, so that parsing the leading quantity in something like "99 bottles of beer" will give you an int immediately after the parsing step is done.
 
Okay, but for instance, if I do 3 // 2 (Python3) I will get an integer.
 
Ah, so you are looking for an analog to integer division, say, integer multiplication? Multiply one or more floats, but get an integer back? Should that round or truncate?
 
2:36 PM
It's really not a big deal, I'm just annoyed by how int(int( looks ... :)
@PaulMcGuire parameterized :) (yes that's a real word)
 
Then convert the "100" string to an int (or float) as soon after reading it that you can. An added benefit is that you will not have to sprinkle int()'s all over your code every time you want to do some arithmetic with it, or get runtime surprises when you multiply it by an integer, and get 3 * "100" and get "100100100".
 
@PaulMcGuire Again, the code I put here is just a sample. But generally speaking I take care of those things. Here specifically it reads input params from somewhere, and most of them are not numbers (ints) I know which ones are, but im not going to worry about a smart parser, just put the ones I want into this function.
And it just bothered me to look at int(int(
 
Googling "man trap" did not turn up the man page I was looking for.
 
Sometimes little annoyances like that can lead to refactors on a much higher scale, which ultimately turn out to be good for the project :-)
 
There are many ways I could optimize this whole thing. But that's not the scope of my question. Again - I just want to know if anyone has an idea how I can do that specific function any better?
 
2:41 PM
@InbarRose Well from reading this a bit I feel that both int's act on separate layers. The inner int is to convert user-data to usable data for the program.
The second is maintaining integers/doing calculations.
Shouldn't they be split in multiple lines?
 
Maybe for good reason. If it bothers you, it might actually be a slight code smell. It is saying that in this one line you are doing too many things. And its also misleading that int() is being used for two different reasons, one for string->numeric conversion, and one for truncation.
 
Trying to keep answerers focused on a particular scope of a question is like herding cats. "Why do you want to do that?" is one of the most common comments made on the site.
 
@Kevin
but often, "why do you want that?" is part of uncovering an underlying XY problem
 
Begrudge not the wayward answerer for answering the question that he wishes was asked instead of the question that was asked.
 
@Kevin :)
Yes, I am aware I am being difficult. I just know there has to be a little trick I can do somewhere to make it look nicer.
Because after all readability counts
 
2:44 PM
You could always do int(float(
 
@PaulMcGuire True :)
 
or int(round(int(
 
I could also do int(eval( :P
 
def truncated_mult(a,b): return int(a*b)
def add_ten_percent(number_string): return truncated_mult(int(number_string), 1.1)
Tadaa, no ints adjacent to other ints.
 
add_ten_percent = lambda s: eval("int(%s * 1.1)" % s)
 
2:47 PM
Is it now a challenge to make the most long winded code to do something?
 
reductio ad absurdam - actually one of my least favorite argument tactics
 
@PaulMcGuire Yes, but sometimes useful.
Reminds me of the SOcratic method :)
 
I see what you did there
 
@PaulMcGuire :)
 
@PaulMcGuire It's all fun and games until someone does add_ten_percent("0) + __import__('os').system('rm -rf *')")
 
2:49 PM
@Kevin Ha! jokes on you, this system runs on windows! :P
 
/me renaming Kevin to "Bobby Tables"
 
user559633
@InbarRose "runs"
 
Oh, where was that XKCD......
@tristan Clearly a joke. Notice my "colon capitol p" ?
 
user559633
xkcd is the big bang theory of web comics
 
This was fun, but the paying gig beckons - rbrb
 
2:51 PM
@PaulMcGuire Yes, return to your job! :)
@tristan or, (more aptly) the big bang theory is the XKCD of TV-Shows?
 
user559633
i said what i meant
 
I meant what I said.
 
Tristan not liking xkcd is the Big Bang Theory of reoccurring chat room discussions.
 
user559633
if anything, it's my groundhog day of chat topics
 
No, if anything its your trope.
 
user559633
2:53 PM
xkcd is the trope of tropes of pandering
 
Wait what, you both dislike big bang theory and xkcd?
 
user559633
@paul23 yes.
 
shocked
 
@paul23 "both" as in both of those things, or "both" as in two people?
 
I will say that XKCD has gone way downhill lately. I think a lot of the earlier ones were good, and I still enjoy the interactive ones, but the last couple months it just hasn't been funny.
 
2:56 PM
Oh "you", such a great work in English.
 
in the face of ambiguity, refuse the temptation to guess :)
 
The word thou is a second person singular pronoun in English. It is now largely archaic, having been replaced in almost all contexts by you. It is used in parts of Northern England and by Scots (/ðu/). Thou is the nominative form; the oblique/objective form is thee (functioning as both accusative and dative), and the possessive is thy or thine. When thou is the grammatical subject of a finite verb in the indicative mood, the verb form typically ends in -(e)st, most often with the ending -(e)st (e.g., "thou goest"; "thou do(e)st"), but in some cases just -t (e.g., "thou art"; "thou shalt"), although...
 
hello everyone
I need to knw something.. i have observed something strange
 
"In Old English, thou was governed by a simple rule: thou addressed one person, and ye more than one. After the Norman Conquest, which marks the beginning of the French vocabulary influence that characterized the Middle English period, thou was gradually replaced by the plural ye as the form of address for a superior person and later for an equal. For a long time, however, thou remained the most common form for addressing an inferior person."
 
@brainst Sorry, we are a bit odd - but I never imagined we would be observed and considered strange
 
3:04 PM
Remember this @brainst then you know something
 
I'm using my psychic powers to determine your observation... Why yes, creating lambdas in a loop does bind to the last known value of a variable rather than the value it had when you created the lambda. It's surprising when you first encounter it but it makes sense if you think about it for a while.
 
@Kevin What an astute observation to be had when parleying with strangers.
 
>>> funcs = [(lambda: i) for i in range(10)]
>>> funcs[5]()
9
 
I gotta say, SO probably has the best spam/troll posts.
 
That was so 1 hour ago... :P
 
3:07 PM
http://pastebin.com/0vXmh9VT
See this code .. it calculates the sum of prime numbers upto nth number

But whenever i try to run this code .. my computer shuts down in the middle of execution
is it because of heavy computation
or is it something else not related with the program?
 
Possibly. What are you entering as the input?
 
I mean, your computer shouldn't be shutting down unless you have a major hardware problem.
 
@brainst You can't call your variable int
 
I observed the same thing when i was trying to compute first 2 million prime numbers using a c++ problem
 
s/can't/shouldn't
 
3:08 PM
program*
 
@MorganThrapp My computer freezes all the time when I run programs that have really heavy computation.
 
@Kevin Huh. I've never seen that happen with Python.
 
I would agree with "no good computer should shut down unless...", because my computer is garbage.
 
well it has happened with me
 
@MorganThrapp Have you tried computing something very complex?
 
3:10 PM
@InbarRose Apparently not.
 
@MorganThrapp Try doing math.factorial(9999999)
 
@Kevin uhh a modern os will always at some point take priority to handle user-input? Then you can always open a task manager etc?
 
and this is the c++ program pastebin.com/LsUZXLkX
 
@Kevin I mean, isn't that what my disclaimer says? :P
 
i tried computing 2 million it shut down at around .5 million
 
3:11 PM
@InbarRose It's running now.
 
@brainst You are shadowing the builtin int, call your variable something else.
That's the first thing.
 
@InbarRose ok
but the program runs fine anyway.. it computes right prime numbers
why does my laptop shut down.. tht's my concern :/
 
Ok, I just ran the program with n equal to a million and it executes just fine.
 
cpp or python?
 
@brainst Probably to protect itself I guess.
 
3:12 PM
Python.
 
@brainst It really sounds like you have a hardware problem.
Which isn't really anything we can help with.
 
The CPU might be getting over excited, and the laptop doesn't want him to pop :P
 
@Kevin can u try cpp as well upto two million
 
over excited CPUs....came back online at the right time.
 
My initial guess is either the CPU is getting too hot, or you have bad RAM sectors.
 
3:13 PM
it will take about 10-15 minutes lol
 
CPU would be the more likely explanation, though.
 
@MorganThrapp That's the worst, when the bad ram sectors are like the the last ones to turn on.
 
Nah, compiling c++ programs is too much work.
 
@idjaw It happens when I browse internet images late at night!
 
Took me over a year of random computer crashes to realize it was one of my ram sticks
 
3:14 PM
@Kevin ok.. nevermind
 
@InbarRose Doesn't windows check for bad ram during startup - and then makes sure it doesn't write to those regions?
 
thank you everyone
 
@InbarRose That's why I run memtest and prime95 once a month. I've been bitten by bad hardware before.
 
I know it does check for hard drive problems
 
could it have something to do with os o.o
??
windows 7 is what i use
 
3:15 PM
Maybe, but there really isn't any way for us to diagnose this any further.
 
@paul23 You'd think.
 
ok
 
I'm also on Windows 7 so I find that unlikely
 
Windows 7 won't inherently crash because of it, but if you have a corrupt DLL somewhere, or a broken page file, or any other one of a million potential problems.
@InbarRose It's still running. Using about 30% of my CPU and ~60MB of RAM.
 
Thank god for isolation / GIL :)
 
3:19 PM
I believe this q by Aaron should get more upvotes: stackoverflow.com/a/28443901/918959
not mentioned in the other
 
@InbarRose Yup :D That's why I was so surprised that people's machines are crashing.
 
@AnttiHaapala Agreed.
 
user559633
voting ring activate for a documentation lifted answer
 
I haven't seen Aaron in a long time
 
user559633
3:21 PM
except blair conrad's answer already covers the else case in more succinct terms
 
What would the HTTP status code be for a user who is not logged in because they do not have a password? 401?
 
user559633
so that answer is tagged onto a popular question for dem sweet internet pointz
 
@tristan except it doe snot
 
user559633
"else runs if there are no exceptions and if not interrupted by a return, continue, or break statement. The other answers seem to miss that last part." blair conrad's answer: "The statements in the else block are executed if execution falls off the bottom of the try - if there was no exception."
 
it says "falls off - if there was no exception"
 
3:23 PM
@corvid 403 - forbidden seems logical? or 401 unauthorized w3.org/Protocols/rfc2616/rfc2616-sec10.html
 
this is wrong :P
 
user559633
you have a pattern of thinking someone is wrong when they disagree with you
 
while 1:
 try:
    break
 except Exception as e:
    pass
 else:
    print(42)
else not run.
 
Right, because execution didn't fall off the bottom of the try.
 
3:24 PM
It didn't hit the bottom of the try.
 
The problem is I got three cases I need to identify: no user is not logged in, user for the given resource does not have a password, and logged in user's id does not match the resources user
 
user559633
i still think it's superfluous
 
it is not, since the 460 answer did not clarify that
 
user559633
then why not a suggested edit?
 
it made me think it means "an exception is thrown is needed to not drop out"
I cannot "suggest" edits
I can only edit, or leave a comment
 
user559633
3:27 PM
all edits are suggested when the op can reverse it :P
 
user559633
it would be cool if there was a mechanism on each question that encouraged de-duping/wiki-ing an authoritative answer derived from the other posts on the page
 
I also wish it was possible to suggest edits even as a 2k+.
For the times where I want to edit an answer, but I want to check with the OP first.
I can leave a comment, sure, but if it's a major revision to the answer, it's kinda impractical.
 
I have a problem with old incomplete accetped answer to 2009 newbie problem invariably has hundreds if not thousands of upvotes
 
user559633
stackoverflow? more like heapoverflow
 
well... more like inverted heap
or heap that gets filled from bottom :d
@tristan like: you've got 6.2k rep
that guy got 2/3 amount of your lifetime rep for writing that answer :D
 
user559633
3:38 PM
@AnttiHaapala yep. early and popular amateur questions bring on the votes.
 
hmm martijn's got 3 answers with higher reps
@tristan speaking of merited answers: stackoverflow.com/a/30216145/918959
 
user559633
What about it? That it's ^63 for a "here's a couple lines about a basic thing?"
 
it used to have 64
I downvoted it because it was wrong
I am now writing a comment on how wrong it is
 
user559633
Oh wow, it doesn't even really try to prove itself.
 
question is "why is x faster than y"
and the answer says: "because"
The reason for the speed difference is the global lookup and especially the function call, as explained in the other answers. On my Python 2.7.10, building a list from your example string is faster with [i for i in 'wham bam'] than with list('wham bam'), with exactly the same reason: Using a list comprehension in Python 2 requires neither a global name lookup nor a function call. Yet the results of these 2 operations are the same. Of course in real scenarios list(iterable) would be faster if the iterable has sufficiently many elements. — Antti Haapala 23 secs ago
 
3:53 PM
@Kevin That is really cool. Makes an interesting nerd snipe even better.
 
4:09 PM
Reading Preventing a tkinter Entry from gaining focus when its associated StringVar changes, I wonder if I should add "changes to StringVar causes a focusin validation event to trigger even though focus never changes from the point of view of the user" to my Big List of Tkinter Grievances.
You know what, I will. Grievance #26 added.
 
user559633
Is there a reason you stick with tKinter? Licensing? stdlib?
 
Masochism?
Hipster?
 
Despite my griping, it satisfies my meager needs.
It's very very rare that I actually need something fancier than a single window with a grid of text boxes / buttons / canvases
Yeah I agree with you that it's not a beautiful solution. If it were me I'd probably stick the Entry and StringVar and validationcommand all in a single class and only expose them through a sensible interface of my own design. — Kevin 2 mins ago
I think this may have been a dumb comment.
Now I've given OP the opportunity to say "well why don't you go ahead and implement that for me?"
 
@tristan new avatar is wonderful
It's my lucky day, two good Flask questions so far.
 
user559633
@davidism oh, thank you :)
 
4:22 PM
If you say "in this situation I would probably do the needful", don't be surprised when OP tells you "please do the needful"
 
user559633
the mienfield custom flag editor is simple and good for pixel art
 
4:33 PM
@davidism can you share the flask questions? curious to see them
 
Flask code is pretty
You put the same one twice
 
Okay, I'm glad I'm not losing my mind.
 
I opened the same page about 6 times to figure that out
 
<_< no I didn't >_>
 
4:40 PM
:)
 
Flask code is pretty when written well, I've seen plenty of train wrecks too.
 
Does SO have some sort of 'referral' for page links? I noticed it seems they put some sort of user id at the end of those SO links.
 
It does.
There's some badges for it.
 
Yeah, but it only works for links from off site.
(guys you're allowed to upvote the questions too)
 
Flask is just great because decorators are best
 
4:50 PM
I believe @tristan has been replaced by his eval twin today
and before anyone gets to say anything, I've been replaced by my eval twin in the womb
 
user559633
i absorbed my twin in the womb. i have the strength of one man and one premature baby
 
today I am doing my favourite thing: debugging javascript in IE11
 
I hereby propose that Unicode be supplemented by 2 new control characters: BOS and EOS
 
user559633
@MorganThrapp haha nice, i forgot whence i stole that joke
 
4:54 PM
sample usage: <BOS>today I am doing my favourite thing: debugging javascript in IE11<EOS>
 
user559633
an XML variant with arbitrary closing tags. great.
 
Irony punctuation is any proposed form of notation used to denote irony or sarcasm in text. Written English lacks a standard way to mark irony, and several forms of punctuation have been proposed. Among the oldest and most frequently attested are the percontation point proposed by English printer Henry Denham in the 1580s, and the irony mark, used by Marcellin Jobard and French poet Alcanter de Brahm during the 19th century. Both marks take the form of a reversed question mark, "⸮". Irony punctuation is primarily used to indicate that a sentence should be understood at a second level. A bracketed...
 
ironically enough, that is hardly unambiguous
 
@tristan I'd like to pretend that I remembered where it was from, but I just googled it because I knew I had heard it before. :P
 
A company tried years ago to patent a sarcasm mark and were laughed at by Reddit. Apparently they're still around: sarcmark.com
 
4:57 PM
ok this is "funny". After trying something for a few days I just discovered I was using an old version of python for my project on this laptop.
 
user559633
what kind of unredeemable piece of shit adds new syntax to a natural language and tries to trademark it? oh wait, people too dense to pick up on sarcasm
 
@davidism I, wow. They wanted to patent it? I can understand why they were laughed at.
 
user559633
the sarcmark is a great idea. i really respect the interesting work they're doing
 
Hey, at least it's free.
 
> U.S. Patent No. D608820
 
user559633
5:01 PM
Sarcasm: ˈsärˌkazəm
- the last refuge of modest and chaste-souled people when the privacy of their soul is coarsely and intrusively invaded.
- a sentence terminated by syntax defined by US Patent No. D608820
 
@davidism "tried"
that says the patent was granted
and being cited by samsung
 
yeah, I was just looking at that
 
@tristan -.-
Up there with sarcastaball right?
 
28
A: How do I empty an array in JavaScript?

kenshou.htmlPerformance test: http://jsperf.com/array-clear-methods/3 a = []; // 37% slower a.length = 0; // 89% slower a.splice(0, a.length) // 97% slower while (a.length > 0) { a.pop(); } // Fastest

lol this sht answer has +28 score :d
 
user559633
are the SO answers licensed in a way that they could be exported for use on another site?
 
5:10 PM
@AnttiHaapala I like especially that he ignores stating the size of the tested array for this.
If the array is already empty (or containing a single element) popping might be logically faster.
 
The flood of answers to that question is hilarious and could only be enhanced by jQuery.
 
@paul23 the tests are linked there but I guess this works so because the first test sets the global a = [], and it works from there on...
but I am not too sure
 
@tristan as in you see these other sites that seem to hoover up SO content?
 
user559633
@RobertGrant yeah, and if we wanted to have something like "stackjump" that rolled up answers into "in depth" v. "does the needful ASAP"
 
5:21 PM
The map-territory confusion is strong in this one: convert a string into a dictionary given the format of the output in python
 
@tristan make a site that pulls in Javascript the question and top answer, and stick ads on it :)
 
He's json.dumping a list-of-dicts into a string so he can chop off the first and last square bracket, and that somehow makes the result a dict by magic
"I know that if i slice it as in y= y[1:len(y)-1] and get rid of [] of the original output, it's in the dict format"
 
Can someone help me in python issue
 
@SheenaWadhwa don't ask to ask, just ask your question. See sopython.com/chatroom
 
It sounds like he got 90% of the way to where he wanted, by doing string manipulation and then copying the string off of the console and pasting it right back in
Probably the answer to the question he asked is "use eval", but the answer to the question he should have asked is "don't use dumps to access interior parts of a nested data structure"
 
5:25 PM
@MartijnPieters "urgent deadline" > on sopython :-P
 
@davidism c&p fail.
fml.
 
@paul23 like wtf?
@paul23 it still seems that the pop is faster than assigning to length
 
Not experienced with JS's internals - but I find assigning to length already a bad thing to even think about.
 
user559633
recently asked questions
 
5:31 PM
My code is working properly on other data sets like sample datasets downloaded from internet, it prints the output but when am using "caida" dataset its not printing output of the header fields..
 
but but it's so weird, and the comment confused me even more :(
 
user559633
then offer a bounty or wait 24h.
 
If you need links to both dataset I can provide that too
 
I'll wait and see anyways, have to prepare for hockey training anways :P
 
5:33 PM
@paul23 it is not a bug in python
 
I asked this question on main site too but no one responded me .. am stuck in this issue if someone can help than pls
 
user559633
@SheenaWadhwa Okay, so add more detail on the question you asked on the main site. If someone wants to help, he/she will.
 
I can send link of my question if someone can help then do visit
1
Q: Python IP print output is not working

Sheena WadhwaMy code is working properly on other data sets like sample datasets downloaded from internet, it prints the output but when am using "caida" dataset its not printing output of the header fields.. here is my code import dpkt from dpkt.ip import IP from dpkt.ethernet import Ethernet import st...

In comments I also gave the links of sample data set and caida dataset
 
@paul23 pepkac
 
Incidentally, writing "can someone help?" in a comment on your question doesn't do anything to make it more visible. Edits to a question will bump it up the "active" queue, but comments won't
 
5:41 PM
Okay am gonna give the links in my question
 
stackoverflow.com/questions/35463956/… dupe of the linked question. It's exactly the same question, but the linked one is the newer one with the sample data.
 
XD
 
Wow, hardly had chance to look at this tab all day, and now it's time for London Python Dojo! Rhubarb, all
 
Evenin' cabbage
 
Cbg, Intrepid.
 
5:53 PM
Am stuck in the office waiting for this 3D print to finish, so I'm going to inflict myself upon thee ;)
 
I'm trying to figure out how much current flows when you lick a nine volt battery but I can't find any data on the resistance of the human tongue.
 
this page has some data about resistance of human contact points under different conditions. I guess "Wire touched by finger (wet)" is the closest approximation.
 
7kΩ
Huh, that's higher than I would've expected.
 
Although I'm not sure how saliva compares to other forms of fluid when we're discussing conductivity.
 
5:57 PM
And it's not just skin, it's a tongue, so it's muscle
 
ok, so current equals 9V / 7k horseshoe...
 
@IntrepidBrit That's a good point.
 
@IntrepidBrit Yeah, and the surface area of a nine volt battery contact point is larger than the surface area of the tip of a wire.
 
@MorganThrapp yes this question too was posted by me
 
This answer suggests that the use of eval() is safe when done as described. Is the answer incorrect (as noted in a comment below)?
 
5:59 PM
TL;DR 1.9mA and 0.01157W.
 

« first day (1965 days earlier)      last day (2983 days later) »