« first day (3202 days earlier)      last day (1764 days later) » 
00:00 - 21:0021:00 - 00:00

12:46 AM
Anyone home?
 
1:21 AM
cbg
 
1:32 AM
cabbage (:
 
 
1 hour later…
2:57 AM
cabbage
 
3:17 AM
cabbage
 
3:43 AM
For regex (.*?), is it possible to match everything except for a specific word?
 
(?:(?!specific_word).)*
 
 
1 hour later…
4:57 AM
Cabbage fellas
 
 
1 hour later…
6:01 AM
Arne: "It's not that I'm avoiding classes, I'm not considering them unless I need to. Slightly different perspective", what is this mean
 
6:25 AM
It was in answer to a guy who wanted to parse json and would always insist on turning it into an object
I wanted him to question that default assumption that you need to turn everything into objects first that you get used to if you only ever write OOP code
 
I had read some article about oop and it says current usage of oop drop far from its own intentions of invention, the author says that functional programming is way more efficient than oop, I recall that article after reading this words, the article actually makes sense when you read it
 
"hammers are better than screwdrivers"
^ that's all I heard
 
I found for you all, here, it really makes sense a lot medium.com/codeiq/…
At least for me
 
@Aran-Fey ever used a power hammer? They really are!
 
6:43 AM
I have used conda with python 2.7 but when i want to launch conda-navigator again it isn't starting. in conda prompt #where conda command generates the following message: INFO: Could not find files for the given pattern(s).
can anyone help me please. I think path have changed that's why i'm getting the error.
 
"...which strongly correlates with pains in interaction with the community." lmao Andras Deak
 
7:10 AM
cbg
Into how many parts should I divide a 50 GB file for processing in pandas? any idea anyone?
I am getting a memoryerror despite using a cloud machine
 
in as many parts as it's necessary for them to fit in your memory
 
Hi guys! I'm currently running a python script in Mac terminal. I get a system error related to a dlopen. The file path does not exist that it is searching but the resulting file that it wants is in a different path. Is there a way to ammend this?
 
@Rumplestillskin nobody will be able to help without an MCVE
 
@AndrasDeak How do I decide that? by trial and error? the cloud machine has around 240 GB RAM
 
you could try putting together a small (~1 GB?) chunk and see how much memory that uses during processing
 
7:19 AM
Ok
 
that's no guarantee of course because the memory need might not scale linearly, but it might give you a hint
 
Got it thanks
 
no problem
 
7:41 AM
@Rumplestillskin this is really unclear ... you obviously really can't open a file which doesn't exist, or do you mean the file does exist but the system somehow can't find it anyway? find it how exactly? something like this? stackoverflow.com/questions/19776571/…
 
7:56 AM
cbg
 
cbg
 
8:17 AM
cbg-ning
quick question guys: what is a property cursor in python?
 
that isn't a standard python term I have heard of. Can you give more context about it
where did you learn about it? What code was it used in?
 
user10984358
heya, lets say I have a python program that uses like 5 other python programs (local imports for my functions) if I have to give this whole folder to someone so they can test it out, how can I do so with only the .pyc files?
 
you don't want to share the source code with them?
 
user10984358
well thats another way to put it
 
user10984358
lol
 
8:25 AM
@DeveshKumarSingh this is what I was talking about
 
user10984358
if pyc's can be decompiled thats another issue but its pretty much what I want
 
@AndyK From the python docs: [property], and the cursor I think referers to connection and cursor objects in pymysql
 
user10984358
$ python openGUI.cpython-36.pyc
Traceback (most recent call last):
  File "./openGUI.py", line 9, in <module>
ModuleNotFoundError: No module named 'getColNames'
 
user10984358
when I compile the main file this is what I get, I have them all converted to .pyc's
 
@DeveshKumarSingh you have the same in pgsql
 
8:29 AM
sure, it essentially refers to the database cursor, but I guess your main question was about property decorator, you can read up online about it, starting from the python doc I linked
 
it was property decorator
not sure why my mate called it property cursor
 
well, I cannot comment on why your mate called it so, but I think you got the point
@TheNamesAlc and you have getColNames.pyc ?
 
user10984358
I initially had getColNames.py in the root of the folder now I have getColNames.cpython-36.pyc
 
user10984358
if its of any help I used this to get the pyc's
 
user10984358
python -m compileall .
 
user10984358
8:33 AM
I didn't mess with the names, I assumed the convention was there for "stuff" to work
 
also you should know that there is a way to get .py back from .pyc. This SO answer refers to uncompyle6 which can do it
Also this answer touches upon how it's a bad idea to attempt to protect python code like you are doing
 
user10984358
@DeveshKumarSingh yeah i saw that, I am under the assumption they wouldn't go to that lengths, its just that I have so many comments that I prefer are better left hidden, they dont add any significance to the code
 
user10984358
I am just too lazy to remove those comment across those files
 
If I was you, I would make my life easier and make those comments more readable and usable to the end-user, instead of playing around with pyc files
well you can always find-replace those comments using file operations/regex
 
user10984358
if by end user you mean my professor then yeah I wanna make his life easier as well, but still thanks for the input
 
user10984358
8:38 AM
in case anyone else stumbles upon this do let me know of any "abstraction" that can be done here, for now I will remove those comments
 
is it a homework? If the code is just run through an auto grader and evaluates it, no need to worry about those comments
 
user10984358
its a homework, what's an auto grader?
 
but If the code was supposed to be read, why make comments which you don't want others to read in the first place
essentially a script which runs through files, collects the output and compares it again a known solution, and uses it to grade
 
user10984358
no one cares what I have in it, they just want an answer when it is built, so comments were not a priority to begin with
 
user10984358
like a test case in online compilers (coding contests etc)?
 
8:41 AM
yes in layman terms, but these are more complex, some of them have anti-cheating mechanism in them
anyways, I won't digress further, it seems you know what to do
 
user10984358
yeah I will look into auto grader
 
user10984358
thanks again
 
no problem
 
 
3 hours later…
11:19 AM
This is not working in python 2: a.replace('\\\\', '\\')
It wont replace \\ with \
 
@AlperAyna MCVE, please
you probably have \, not \\ in your string
 
>> a = 'X:\\2CALBAPP_A400P11_alper\\gill_vob\\6_coding\\src\\p_l\\p_l_com\\p_l_cc\\p_l_cc_j1939\\src\\P_L_Cc_J1939_A1doc_Tx_Frm.c'
>> b = a.replace('\\\\', '\\')
>> b
>> 'X:\\2CALBAPP_A400P11_alper\\gill_vob\\6_coding\\src\\p_l\\p_l_com\\p_l_cc\\p_l_cc_j1939\\src\\P_L_Cc_J1939_A1doc_Tx_Frm.c'
 
@AlperAyna a has no \\
 
Oh, it seems an escape character
 
print(a)
 
11:25 AM
My bad lmao
 
@AlperAyna two things that might help: 1. Raw string literals, 2. The fact that most path-aware things accept forward slashes in python, even on windows
 
@AndrasDeak Raw string literals exist here, I just did not add in this example, thank you very much
 
OK
Windows path names are one perfect use case for them
 
11:52 AM
Guys this was really nice
 
12:43 PM
Hi again guys
 
@RaphX regex101.com will help you
 
I tried it there and its showing the expected output in green but its not coming as being shown
 
make sure you're using python syntax
 
Ok I was using PCRE , I will try using that
 
you didn't say what the problem is, but I suspect replacing your re.findall(...)[0] with re.search(...).group() will fix it
 
/me sits in the corner...
@Devesh oh, and once again, sorry for my delayed reply
 
Hi, line 11 in this code pastebin.com/zUCrW5vN gives this error: num must be 1 <= num <= 0, not 1. Someone can take a look? I also tried line 9 without success.
 
@aderchox that constraint is very hard to satisfy. Is that the exact error message?
 
@JonClements hey
 
heya @AndyK - how you doing?
 
12:54 PM
@JonClements not too bad, new python code, new challenge
 
sounds alright to me then :)
 
you?
@JonClements always kind of scary because of the codebase but well, this is part of the code life
last experience was hell of intense, tbh
 
@JonClements hey Jon, no worries :) Initial days of the channel. I have been keeping up with the job postings. It's been fun lol
 
@AndrasDeak yes haha. but to complete it: ValueError: num must be 1 <= num <= 0, not 1
 
@AndyK ssdd and all that, but thanks for asking :)... and yes... that's c'est la vie coding :p
 
12:57 PM
@JonClements indeed
 
@aderchox unfortunately I can't run your code because it's not even remotely an MCVE. All I can tell you is that the error you're getting is nonsense. Try to track down where the error is coming from, and why it's nonsense.
 
@RaphX I'm pretty sure I know what the problem is, but you should really be able to debug something of that caliber on your own
 
@RaphX please take that more-than-a-hint
 
@AndrasDeak Yes thank you
 
Do we consider all of the sopython preconstructed comments up to date and fit for use? I'm trying to put more effort into reviewing as well as answering and want to be sure these copy/paste responses are good to go.
 
1:05 PM
I didn't even remember we had those
 
They are slightly different than the ones the community at large uses
 
Mar 3 at 11:52, by Andras Deak
but most canned comments probably overlap with https://github.com/SO-Close-Vote-Reviewers/auto-comments
those are the ones I know about
from a quick glance the sopython ones seem fine
 
wow, first time I have seen that page
 
@Dodge In "Link-only answers" I'd replace "atrophy" with "rot" or simply say "for links to become unavailable, or change content", since it will be friendlier to those whose first language is not English.
 
good point
and @Dodge, make sure you know what a link-only answer means meta.stackexchange.com/questions/225370/…
 
1:09 PM
I have heard atrophy associated with diseases
 
@DeveshKumarSingh yes, but many haven't
 
@AndrasDeak indeed... however the SOCVR guys have finessed lots of those from feedback and what not... so possibly not a ridiculous idea to review anyway
 
Under "Posting an answer as an extension to a question" i'd include the whole phrase "edit your original question" i the link text.
 
@holdenweb okay, makes sense
@AndrasDeak got it, I'll read through that
 
1:22 PM
"Self-vandalism" doesn't really explain the behaviour it seeks to discourage (which is, I presume, altering the question radically because you wish you'd never asked it?)
 
hello, I think I need to set up a dedicated web service (asp.net) that makes a call to a python process, I was wondering what is the best approach to take for this? The python process is some custom NLP framework using something like NLTK that I need to send text to it and get results back. I was looking at Flask, Eve and Django, so my master web service could be set up to call a python service....
Or I could also start a python process from c# and use standard input/output to process data
 
Under :Off-topic posts" it seems like "Questions that lack sufficient information to diagnose the problem" is no longer used in the referenced page. I didn't check for others.
Under "New users leaving comments as answers" why "New Users"? Surely nobody should leave comments as answers. Not noob-friendly! Witch!
Here ends my review.
 
1:39 PM
I tried with the method you told, its working with other strings but not with the expression I used, its returning Nonetype which is why I am not getting any output but according to regex 101 I should be getting some value@Aran-Fey, sorry I guess I am a noob
 
if it's working on regex101 then either your regex is different or your input is different
 
@erotavlas If you want to just send and receive text from a foreign process, don't complicate it by wrapping the process in HTTP or anything. Just use the subprocess module to run it.
 
This is what I am putting there in the regex box
strasse\s*(\d+\s*-?[A-Za-z]{0,1}\d*)[^A-Za-z0-9]
This is the expression I am putting in the test box
Anton Baumgartnerstrasse 32A
 
make sure you have the obvious pitfalls cleared when using regex101. ie. 1. make sure you have python selected on regex101 and 2. make sure you prepend the r flag when using the regex string in python and 3. make sure the global flags for regex, if any, are the same.
 
If I paste those into regex101 I get no results.
 
1:42 PM
^
 
@erotavlas this answer will give you the basics.
 
can you tell me more about 3?@ParitoshSingh
I do have the first two flags selected at regex101
 
no, that's not your issue atm. read what Aran said.
do you expect your regex to match something in the string? because it doesn't for me.
 
Are you using unit tests or the test string area?@ParitoshSingh
 
@holdenweb actually right now I using pyinstaller to bundle my python code into a windows executable that I call as a process from my application, but it is so slow to load (loads large machine learning model) also some machines couldn't handle the memory footprint so I wanted to offload this to a webservice to lighten the load on the application....that was my motivation
 
1:49 PM
@RaphX regex101.com/r/y8RWdQ/1 regex101 allows sharing of links.
 
hey @holdenweb, about your comment the other day. What I said wasn't directed at industry veterans in general, it was about people who write that despite having a lot of experience don't want to / know how to write posts on stackoverflow.
 
@erotavlas Sure - I was suggesting how your web service should call the Python process, sorry if that wasn't clear. Essentially you just want to remote the service and have it usable from your application via an HTTP library, correct?
@Arne thanks - no need to worry, I didn't take it personally, I was just pointing myself out as a counter-example known to me.
 
I found out the difference, I put the string inside quotes, I thought those wouldn't make a difference @ParitoshSingh
 
Couldn't you have found that out all on your own? It seems rather a waste of the brainpower in this room to ask it to find your transcription error by purely psychic means.
 
@RaphX Im amused how anything and everything you posted would have never led to that conclusion. Happy to hear you got it solved on your own, but you really need to work on what you share when explaining a problem.
 
1:55 PM
@holdenweb yeah I mean I can easily start and keep alive the python process using flask, I might try that first.
 
So you want your web service to maintain a dialogue with the NTP program, occasionally passing it input and reading the associated output back to your application?
 
Ok, I didn't know I could share regex 101 links, otherwise I would have done that in the beginning. I thought the save and share was for converting it into a file form or something @ParitoshSingh
 
that's okay, no worries.
 
"I thought" those wouldn't make a difference ... "I thought: the save and share was ...
 
I know, I should stop assuming
 
1:59 PM
@holdenweb yes
 
i googled ntp program and got Nutritional Therapy Practitioner :(
 
yes I was wondering the same - what is NTP?
 
Natural Thought Processing, like NLP but scary :)
 
oh, i could use one of those. :)
 
Are you a data scientist?@ParitoshSingh
 
2:01 PM
@erotavlas I for one would appreciate it if you would take the time to verify these hypotheses yourself. It's part of increasing your programming skill to eliminate such uncertainties before proceeding on them. We never stop making false assumptions, but we slowly learn to be wary of them!
 
@RaphX I don't know whether that title is justified or not for me, but i suppose yes, that's the title i'm given.
 
Cool :D
 
its ok, I agree, its just helpful to hear how other people do things, I mean I might have a way to do something in mind, but there might be a better way
 
2:24 PM
@erotovias - please forgive me - that remark was actually directed at someone else, over whose head it most likely went, so I'll delet it - you are innocent of any crime!
Oh, I don't have delete privs. Perhaps an RO would be kind enough to send my post of 15:01 to the knives?
 
@holdenweb :) understood
 
cbg
 
2:39 PM
cbd
 
cbg
I have a dataset that I want to load in a Colab notebook but it's restricted access so while I can download it myself, a wget or requests.get() returns a 404. It's 44GB while would probably take a month on my wifi.
Is there a way to somehow, get requests to be in the same session as my logged in self?
Changing User-Agent doesn't work
Okay, looks like it's working. I noticed the token they sent was still valid so I first made a call to that page with the token and saved the cookies, then accessed the download link using the cookies.
insert hackerman.jpg
 
How do I use map with a coroutine?
 
2:56 PM
you mean like result = [await coro(item) for item in iterable]?
 
@bzzr do you want someone to just make up some scenario in which you can use the two? Or do you have a scenario you'd like us to consider?
 
async def double(x):
    return x * 2

liszt = [0,1,2,3,4,5,6,7,8,9]
doubled = map(double, liszt)
 
I will keep that in mind@holdenweb
 
@bzzr I think you wanna do something like result = await asyncio.gather(*map(double, liszt))
 
oh nice! I didn't know about gather. thx
 
3:06 PM
'morning cbg
 
@RaphX Thanks. We all appreciate you are learning.
 
@Aran-Fey woohoo we've got a list unpacking splat!
 
I wish there was a way around it, but alas
 
But it's not all about coding, is it? Working as part of a team, especially a remote team, is a valuable skill: consider this room a place where you practice and get feedback. Sometimes the feedback might not seem kind, but it is usually well-meant.
 
I understand
 
3:36 PM
cbg
 
cbg
 
@bzzr from now on all my scratch list variables will be named "franz"
 
;)
 
@PaulMcG metasyntactic variables FTW
fnord is my goto
 
3:55 PM
I've had such a day. I fixed a dozen configuration problems, each of which would have reduced me to a quivering blob if I had tried to fix them five years ago. I'm worried that I'm becoming a domain expert in walking over a hundred feet of broken glass.
 
user10984358
revSort=__import__('functools').partial(sorted,reverse=True)
and
from functors import partial
revSort=partial(sorted,reverse=True)
 
user10984358
what is the difference? is one preferred over the other?
 
the method with fewer underscores is always preferred
 
Whenever possible, prefer import over __import__
 
user10984358
considering my only use of partial (or any function) is in that line
 
3:56 PM
Yes, even if you're only using the function once, prefer import over __import__
 
user10984358
why would one use the dunder syntax??
 
To collapse the two-statement form down to one, I imagine
 
I've only ever used __import__ in code golf when I was only allowed to write a single statement
 
__import__ is useful for when you're breaking into someone's PC through an insecure eval call
 
user10984358
@PaulMcG won't this suffice then?? from functools import partial;partial(sorted)?
 
user10984358
3:58 PM
@Aran-Fey that is where I came across this
 
It's still two statements, just on one line
 
user10984358
stackoverflow.com/a/9383764/10984358, first comment in this answer
 
user10984358
I changed the example though
 
Revision: "... when I was only allowed to write a single expression statement"
 
user10984358
in regards with faster execution or any internal stuff, I shouldn't use the __ import __, thats my takeaway?
 
4:02 PM
Generally, don't call the dunder methods directly, let the Python builtins access them the natural way. (Don't call franz.__len__(), do len(franz))
 
user10984358
alrighty, that aside, eval('0b'+'10')
 
user10984358
how does that evaluate to 2? int(0b10) does the same
 
import foo actually has two more byte code instructions than __import__("foo"), but there is a 0.00000001% chance that the performance bottleneck in your program is in its import statements. You shouldn't care about which one is faster unless benchmarking indicates otherwise.
@TheNamesAlc You don't need to call int() on 0b10, because 0b10 is already an int.
 
user10984358
well I was trying out this question, all you have to do is convert a string of 0's and 1's to binary
 
user10984358
I used the int(inputString,2) sytnax
 
4:05 PM
The 0b prefix indicates that the remainder of the literal should be interpreted as a binary value. Binary 10 equals decimal 2. That's not specific to Python or anything.
 
user10984358
but one other answer used the eval syntax
 
Sure, that's one way to turn a string of ones and zeroes into an int. But I would never use an eval-based approach.
 
user10984358
I just assumed eval lets you use the stuff within quotes as python syntax, so my natural thought was eval('0b'+'1010') would result in '0b1010'
 
Effectively, yes.
 
user10984358
I didnt know it converted that to base 10
 
user10984358
4:08 PM
I just ran that in terminal, so a binary string gets converted to base 10
 
user10984358
eval had nothing to do with it
 
That's a conceptually tricky concept... I don't think it's useful to think of integers as being stored in a particular base
 
user10984358
@Kevin now that you mentioned this message seems to make sense to me
 
AFAIK "The statement x = 0b10 converts the binary value 10 to the decimal value 2" is not, strictly speaking, true. Because integers (and everything else in your computer's memory) is stored as a sequence of ones and zeroes.
 
because numbers don't have a base, textual representations of numbers do
 
user10984358
4:11 PM
its like how escape sequences are shown in terminal unless 'printed'
 
user10984358
kinda like that, aint it?
 
I might argue that the only thing that really converts binary to decimal is int's __repr__ implementation. It's stored as binary right up until Python tries to print it. Then it thinks "oh right, the meatbag thinks in base ten, so I'll have to pretty it up for them"
 
hey guys, if I have n dicts
 
It's more accurate to say "The statement x = 0b10 allows us to assign the name x to the base-2 literal 10, which is equivalent to the base-10 value 2"
 
nested dicts more specifically that look like this
 
user10984358
4:13 PM
peachy!
 
{'a': {'Two roads diverged in a wood, and I...I took the one less traveled by, and that has made all the difference. - Robert Frost': 1},...}

{'a': {'How we spend our days is, of course, how we spend our lives. - A. Dillard': 1},...}
 
Note that the Python interpreter doesn't even consider 0b10 and 2 to be different values. They compile to 100% identical bytecode.
>>> dis.dis("0b10")
  1           0 LOAD_CONST               0 (2)
              2 RETURN_VALUE
>>> dis.dis("2")
  1           0 LOAD_CONST               0 (2)
              2 RETURN_VALUE
 
@Skyler then you have some recursive dicts, unless you're just putting in the ellipses for shorthand
@Kevin indeed. Which just strengthens the argument about base-2 literals
since the only difference is the meatbag interpretation of the value :D
 
So it's not even correct to say "when the program runs, it has to do a little extra work to convert the literal into a value that can fit into the computer's memory"
 
user10984358
I am just gonna assume I aint the meatbag, also which import has 'dis'?
 
4:15 PM
dis is available in the dis module.
 
@TheNamesAlc (un)surprisingly enough, import dis
 
user10984358
I have never bothered looking into byte codes, guess its time
 
@WayneWerner those are a shorthand
sorry shouldve specified
 
dis is, of course, named after the city situated in the sixth layer of Hell, which is where you are if your problem can only be solved by examining your program at the bytecode level
 
not to be confused with import this, which is much less useful for introspecting Python code, and much more useful for introspecting meatbags
 
4:16 PM
but when 'a' matches, I want to now populate the subdictionary with both 'two roads blah blah" and "how we spend"
 
user10984358
@Kevin lol :D
 
and I have to do this for like 1000 nested dictionaries
these matches happen somewhat sparsely
 
@Skyler so, given x = {'a':{ 'xxx': 1}}; y = {'b': {'bbb':1}, 'a': {'aaa':1}}you want something(x, y) such that the result is {'a': {'xxx':1, 'aaa': 1}, 'b': {'bbb': 1}}?
 
how do I go about merge the subdictionaries
 
@skyler I'm not 100% sure I really understand the structure of your data, but maybe this helps. One way of merging two dictionaries is:
>>> d1 = {'Two roads diverged in a wood, and I...I took the one less traveled by, and that has made all the difference. - Robert Frost': 1}
>>> d2 = {'How we spend our days is, of course, how we spend our lives. - A. Dillard': 1}
>>> merged_result = {**d1, **d2}
>>> merged_result
{'Two roads diverged in a wood, and I...I took the one less traveled by, and that has made all the difference. - Robert Frost': 1, 'How we spend our days is, of course, how we spend our lives. - A. Dillard': 1}
 
4:19 PM
Sidenote, that's a really weird datastructure.
 
Requires Python 3.5 or greater. For lower versions, consult How to merge two dictionaries in a single expression?
@WayneWerner Yeah, I'm particularly suspicious that all the values in the subdicts are 1. If the values don't matter and only the keys matter, then they should be sets and not dicts. And if they were sets, merging them would be much easier.
 
4:32 PM
@Kevin they aren't normally one. This datastructure allows you to recover the sentence that a word was found in, as while frequency of the word
trying that now, had to relocate so just saw things
 
If the values aren't always 1, you might also want to consider what should happen if the two dicts have the same keys with different values. The approach I gave discards the first value and takes the second one.
>>> a = {"foo": 2, "bar": 3}
>>> b = {"bar": 5, "qux": 7}
>>> {**a, **b}
{'foo': 2, 'bar': 5, 'qux': 7}
 
If you want to accumulate the values I recommend looking at collections.Counter
 
If the value represents the number of times the word appears in the sentence, I guess you can reasonably assume there's never going to be a key/value discrepancy.
 
they represent the appearance rate, and what happens is this dict is structure such that it's like {word: {sentence:frequency}}
 
So, it's not too badly nested, Just 1 level.
 
4:44 PM
and I want to take a bunch of them and do something like {word: {sent1:freq1,sent2:freq2,...}
for each word
yea
 
I'd take a defaultdict (of a dict) and accumulate all results there for every word.
Requires iteration through all your individual dicts, but seems like the easiest method to me.
With the problem statement phrased in this manner, i presume duplicates are no longer an issue. Because for 1 word, in 1 sentence, it is guaranteed to have the "correct" counts for frequency, so it has to necessarily be the same amounts.
(unless ofcourse for some reason you don't have correct counts of a word in a sentence sometimes. in which case, yikes?)
 
yea, it's already been digested into a wordcount before that was used to generate these dicts
I was trying to see if I could cast these as a pandas series with a bunch of 'a' indexed values
then collapse all the 'a' rows into one row (one dictionary), but that's not looking promising
 
Im sure there's probably ways to make pandas work, but just think about it for a second. your input is a bunch of nested dicts, that don't exactly have a tabular structure. your desired output is a dict. why are you trying to fit pandas in between?
 
yea
 
5:00 PM
Here's a quick prototype of how I would do this. pastebin.com/itQAiH9t
I'm making about 100 assumptions about your business logic and the structure of your input data, but maybe you can adjust it to your needs without too much pain.
 
I need your help guys, I find myself in a heated argument, and I exclaimed that meat cheaper than chopped cow exists, other than insects and pig meat. Though I cant recall any cheaper meat at the top of my head, I know something exists ... any ideas?
 
> My bad, I was wrong.
?
 
Oops, I called strip() in the wrong place. pastebin.com/7qdzJXeq is better.
 
must. win. every. argument.
how about no?
 
How about ... got any ideas? I can't go down like this :/
 
5:05 PM
Purchase the finest cut of tenderloin at great expense to yourself. Announce to your general surroundings, "one-time sale! Finest tenderloin, only one cent per pound". You have thus demonstrated that tenderloin is cheaper than chopped cow, in at least one instance.
 
Oh, that version is far better than what i was thinking of
 
Your debate partner will object that this doesn't prove that in general tenderloin is cheaper than chopped cow. You will say "tut tut! I originally exclaimed that meat cheaper than chopped cow exists. I never exclaimed that meat cheaper than chopped cow is widely available in general. Don't put words in my mouth please"
 
Well, it has to be the market price of the meat, so sales are not taken into account
 
Ok, so don't yell out "sale". Problem solved.
 
No, then it would still not be the market price.
 
5:08 PM
Sebastian's market. the one and only.
 
Ahaha, I don't think that'll go
 
I don't understand the problem. If you're selling a good, you're part of the market.
It doesn't matter if you're selling it out of spite, you're still exchanging a product for currency
 
Well, in order for us to compare the meat, we must look at the >>general<< market price
not some kind of made of market price
 
PSA Don't search Meat Market in your browser at work!
 
like "Sebastian's" market
 
5:11 PM
My take then: Well, i believe meat cheaper than chopped cow doesn't exist, especially considering we all only live in America, and there's definitely not countries out there that don't have cow meat at all to begin with. Perhaps you should google "edible meat" and start going down the list to prove me wrong. :P After all, this is an argument that must be resolved, or who knows what will happen. this. cannot. continue!
Shame, considering if such countries existed, cow meat would probably be a lot more costly, considering it's a lot rarer.
 
Wow, I didn't know one such thing as a "meat price index" website existed: caterwings.co.uk/caterers/meat-price-index-usd
 
Short selling meat?
 
Haha
It feels like I am watching the stock market, though instead of stocks, it's meat.
 
5:33 PM
@Kevin that seemed to nail it, thanks
 
Ooh, all of my guesses must have been right... I should buy a lottery ticket.
 
 
1 hour later…
6:38 PM
A dead cow should be cheaper than a chopped cow, no? That would still be meat. One requires a processing step. Also, a chopped cow could be a blend of all the good and bad bits from 100% of the cow which, on average would be more expensive than exclusively bad bits
 
With the only excluded meat being pork and insect meat, one obvious answer "for meat cheaper than chopped cow" would be chicken.
 
Also that, but I took the caveat to be that it had to be beef
I've had a sudden flashback to the "pig fat explosion" debate, which I think was last year.
 
Chopped cow is dead cow, yes? Oh yeah, I vaguely remember that
 
Yes, but I was referring to dead and unchopped
 
I'm tapping into my latent cosmic abilities to summon someone with an actual programming problem
 
6:54 PM
I have one. Andras recently posted python code to drive gif creation through GIMP. The code creates a generator that spits out globs to provide the file paths to the images. How is that better than just putting the images into a directory and using os.listdir()?
Along with os.path.join() of course
 
For example, if the images are on different file systems you can't just move them all to the same folder
 
If you're saying "isn't listdir better because the files will already be sorted?", not necessarily, because listdir's return value is in arbitrary order. If you're saying "isn't it overkill to allow the user to specify multiple globs? How often do you need to composite together a series of images in multiple directories?", I mostly agree.
My own homebrew gif maker avoids this quandary by taking in a list of PIL.Image instances. It doesn't give a fig where the images are on your file system.
 
Okay, this allows for the creation of gifs from images stored in different places which is more robust but not super critical, got it. It's really cool. I use GIMP a lot but this is the first time I've ever seen an example of how to use the python-fu capabilities.
 
... Which is not to say that taking a list of Images is objectively better than taking a tuple of glob-compatible strings. If you were writing a command-line tool to do this, the latter is better, because you can pass strings as arguments to a command-line command, but you can't pass PIL.Images.
 
7:53 PM
@Kevin "latent" as in they haven't manifested yet?
 
It manifests in fits and spurts, but not in any form I can control
That's what's happening every time I write a message that someone else hasn't finished typing out yet
 
8:33 PM
cbg
 
cbg
 
cbg
today has been a tedious one...going through this HTML form with almost 90 <input>s and modifying them
 
How are datetimes usually written in the US? Would MONTH DAY, YEAR, HH:MM:SS be acceptable? For example Apr 07, 2017, 23:41:07.
 
I think hand-written we use that form, but I often see "MM-DD-YYYY" in computer text formats.
as a red blooded american, that format works, but as a computer programmer I prefer "YYYY-MM-DD"
 
@bzzr Just to rule out my immediate suggestion that I think I've jumped the gun to, where are users entering this info?
 
8:38 PM
we also often us "/" as a separator instead of "-"
 
-38
Q: We’re removing “Hot Meta Posts” from Stack Overflow's sidebar for now; moderators now fully control [featured]

Tim Post tl;dr: We're removing the "Hot Meta Posts" from Stack Overflow's sidebar while we work on looking at how Meta can better meet its goals. To ensure that moderators are able to bring important posts to the community, we'll be giving them exclusive access to the featured tag. "Featured on Meta" w...

 
@roganjosh it's output
doesn't come from user input
 
Ah, ok, I assumed it was user-input in a set format sorry
I think I conflated the message from Code-Apprentice that has been modifying user inputs :)
@AndrasDeak twice, recently, my pointless answers made it to Hot Meta and I was pretty dismayed; I don't think I said anything of any real value to get 1000s of hits and I certainly didn't put anywhere near the effort in to merit it (had I known they would be hot meta posts I would have constructed them better). IMO it should be turned off for now, it just remains to be seen what comes in its place
 
you're not very good with reading between the lines, are you? :P
Few boring posts in the bulletin is harmless. Few vitally important post not being there (company controversy anyone?) is a huge loss.
 
I have never really been active on meta. Sometimes I go to read what's being discussed and get some entertainment from the occasional dram, but that's all.
 
8:44 PM
@AndrasDeak That was in my last line of what was becoming a long post :)
Turn it off in the short-term, I don't care too much. But there needs to be an alternative system moving forward from what they have quickly implemented
Also, I actually find that at least certain mods speak out quite a bit against SO, so things may still hit the Hot Meta board even if SO doesn't want it
 
unless others remove them "to be welcoming"
 
I love how the first two comments made was about controversial posts, and Tim only decides to reply to the third comment about boring posts.
I haven't been reading meta posts in the past, only really started this year, has SO always been this .... < what's the word I'm looking for > business oriented?
 
If they're business oriented then they are doing things wrong
It's a short-term blitz on ad-revenue or any other popularity gains they may get
 
@MooingRawr at least Tim posted it himself
 
00:00 - 21:0021:00 - 00:00

« first day (3202 days earlier)      last day (1764 days later) »