« first day (3165 days earlier)      last day (1788 days later) » 
02:00 - 19:0019:00 - 23:00

2:27 AM
recbg
 
3:10 AM
Test since my internet is not that good here
 
interesting
 
@cs95 Lol
 
lol yourself ;P
 
haha
So few people today
 
yes, most people have better things to do on a weekend
 
3:21 AM
Yeah
 
3:38 AM
Question: should i include a __repr__ and/or __str__ in my class?
For you @cs95
Btw, this is a question of which is better...
 
It depends on what you want to print? And whether you're lazy enough to define __str__ to return self.__repr__() or not.
 
@cs95 I would print something like:
Myclass([1, 2, 3])
@cs95 what would be more optional?
 
define __repr__, if __str__ is not defined, then str(object) will defer to the former.
 
4:47 AM
@cs95 Yeah
 
 
1 hour later…
5:50 AM
@cs95 I made an __repr__
Btw i am trying to make a module
 
6:01 AM
cold i saw your question, i thought it would be a self Q&A
 
not this time bud, I don't know the answer
 
haha
well, can't help due to lack of any knowledge of tenserflow
I mean tensorflow
See i don't even know how to spell...
:P
 
 
1 hour later…
7:32 AM
@U9-Forward That looks like a thing you'd expect __repr__ to return, especially if Myclass([1, 2, 3]) creates an instance. If you don't want to define 2 methods then you should define __repr__. If you just define __str__ then you inherit the default __repr__ from object that just tells you the class name & id, which isn't very useful.
So if Myclass only defines __str__ a single instance will print nicely, but a list of them will use the ugly default __repr__. The str() call defaults to __repr__ if __str__ doesn't exist, but repr() does not default to __str__.
If you want to get fancy, you could also define __format__, if it makes sense for your class.
@U9-Forward It seems you also forget to hit up arrow to edit recent posts. And you also forget that we prefer people to avoid series of single line posts...
 
8:07 AM
Glad I'm not the only one being annoyed
 
Hi @roganjosh how’s the weather looking today for manchester
 
I've been debating whether to say anything or whether you'd consider it tempting fate :P
It's very overcast but not raining and the paving in the garden has started drying out. It doesn't look like it's set to rain any time soon. The reports are still saying that it might not be so good in the afternoon
 
Say away, you cannot stop the clouds from raining
Aah okay so right now its 9:12 there, so 3-4 hours of no rain
 
@DeveshKumarSingh raintoday.co.uk allows you to see what might be coming yourself rather than rely on traditionally-bad forecasting
 
isitdownrightnow.com but for Brits
 
8:16 AM
Okay thanks @roganjosh will keep it open :)
How’s it looking in hungary Andras
 
very hot and then thunderstorms, allegedly
 
Which city in hungary do you stay by the way, if u don’t mind me asking
 
Budapest
 
Ohh nice the capital, I assume your college is situated there then
 
University, but yes. But the vast majority of things in Hungary is in the capital.
 
8:21 AM
Ohh okay nice to know that :)
 
~2M people in the city, 3M in the metropolitan area, 10M Hungarians altogether
 
And Bangalore has 12M population in itself
 
yup
 
8M in the Metropolitan area
 
our 3M was together with the 2M
 
8:25 AM
Ohh okay I think our 8M is including 12M too
 
8:45 AM
wow, those numbers are really surprising. 30% of Hungary is basically in the metropolitan area? I can't even imagine something like that
 
yup, and I can't imagine the population of Hungary living in a city :)
 
hehe, yep, it gets pretty nuts here. :)
 
I was reading about Budapest on Wiki because it's a ~ similar size to Manchester. Looking at the economy, it apparently is responsible for 39% of the national income, which I found surprising considering it contains 1/3 of the population
I would have thought more like 50%. The rural economy must be doing something right, I can't imagine it being so balanced over here
 
"Similar size" how? In percentage of population to total? Area to total? Something else?
 
In terms of population. Manchester has to be considered in terms of Greater Manchester; we have a different setup than anywhere else in the UK. The population of GM is around 2.5m
Manchester-proper is tiny.
 
8:56 AM
@roganjosh I expect they get a bit of income from mining. TIL Hungary has natural gas and uranium. They export natural gas, but I don't know if they mine uranium.
 
That would make sense
 
Their aluminium ore refinement industry had a nasty toxic spill in 2010 en.wikipedia.org/wiki/Ajka_alumina_plant_accident
 
that was a literal disaster
@roganjosh 2.5M people vs 66M? Compared to 3M vs 10M?
I'm not sure I'm following
(but either way I don't know anything about economics)
@PM2Ring our uranium mines were closed in '97
 
My point is more about how urban areas accumulate vastly disproportionate wealth in the UK. For example, the economy of Greater Manchester is bigger than the whole of Wales. London is on another level; your chances of making big money pretty much depend on you being in the city
 
Yes, London has the highest concentration of billionares in the world iirc, whereas the UK as a whole has the fifth highest concentration of billionares in the world
 
9:06 AM
for what it's worth I'd expect the same thing here; from a lot of aspects the countryside is atrophied and has very limited opportunities
for instance all universities are struggling a bit, but the ones outside the capital are fighting for survival
 
Well at least in the UK thats untrue, Oxbridge and russel group unis have been thriving
*small correction: Oxford and Cambridge belong to the russel group
 
Oxbridge and the wider Russell Group has some serious reputational clout so I don't see them ever struggling
 
10:01 AM
no rains till now in the ground :)
 
I need help with plotting in matplotlib. I am not sure how to frame the question so I did not post it as a question. here is my explanation
I read from json which contains 2 high level data (data1 and data2). I can plot data1 or data 2 independently but how do I
use subplot to plot both (df_1 and df_2). Note I still need to manipulate both downstream using the same commands. with the for loop, I can plot just df_1 or df_2

json file looks like this with a lot more data points:
{"data1": {"data": [{"X": 1, "C": 29, "VAL": "A", "B": 23, "A": 546, "D": 16}, {"B": 14, "C": 16, "A": 923, "D": 16}, {"B": 23, "C": 16, "A": 760, "D": 29},{"X": 2, "D": 808, "VAL": "D", "B": 0, "A": 33, "D": 0}, {"B": 1, "C": 723, "A": 29, "D": 0}, {"B":
 
@Starter If your code is longer than about 12 lines, use an external paste tool such as dpaste.com Also look at sopython.com/wiki/…
 
oh oka sorry I didnt know
 
"VAL" is non-numeric data. What type of graph are you trying to plot?
 
What benefit do you get from using dataframes?
And how would you plot one set of data?
@roganjosh pyplot can do categoricals I think
 
10:10 AM
I am plotting a trace of the data but there are 2 traces in the json file
 
Not an answer to anything.
 
the full code and json are pretty long else I could post it
I have made one plot for df_1
 
Not here directly. And try boiling it down to an MCVE.
 
We don't need the full JSON, the example you have given is enough. But we do need some clarification on what exactly you are trying to do
 
okay am pretty new. I dont know what MCVE means
 
10:13 AM
See here
 
okay let me post the full code
 
I'm not sure how we got to this conclusion from that link.
 
Same
 
I am not concluding based on that link.
just saying if the full code will help
 
If you need to post long sections of code, please use an off-site resource (such as pastebin or others) but if it's going to be hundreds of lines of code, it's unlikely we'll want to go through it
 
10:16 AM
not hundreds
about 80+ just to give a clearer picture
 
Get rid of the fluff, keep what really conveys what you're trying to do.
 
okay
 
we don't care about your axes labels or figure size or five irrelevant dataframe columns
the types and their interactions should be representative
 
my code reads the actual dataset but the format is as described in the json
 
So it's a dict of dicts?
 
10:22 AM
yes it is after reading it in
 
with open("trace_72.trace.json") as files:
    j = json.load(files)
df1 = pd.DataFrame(j['ctrl_sample'])
df2 = pd.DataFrame(j['edited_sample'])
df1_d = df1.trace_data
df2_d = df2.trace_data
Yeah, no, that doesn't make it clear at all what your types are. You can replace all that fluff with a dict like the one you showed earlier.
Ooooh, you're struggling with that DNA base pair plotting. Ugh. So much of an XY problem.
Jun 13 at 9:28, by Starter
https://imgur.com/a/tE7urDv?
are you trying to recreate figure 2 from there ^ ?
 
yes my current code can recreate that
but that is just the first plot
 
I don't think I can keep up with trying to help you how to do it right. So let's concentrate on your question: why can't you plot the other one? What stops you from reusing the same Axes?
(note that you completely ignored "we don't care about your axes labels or figure size or five irrelevant dataframe columns", you literally have all that included)
 
Not sure how to do that
 
@Starter how to do what?!
Where are you stuck with your current code? How does it not work?
start reading what people are telling you
 
10:29 AM
I can plot the second
 
23 mins ago, by Devesh Kumar Singh
@Starter If your code is longer than about 12 lines, use an external paste tool such as dpaste.com Also look at https://sopython.com/wiki/An_Illustrated_Guide_To_Formatting_Code_In_Chat
 
plot 1: for i in df_1[0:-1]:
plot 2: for i in df_2[0:-1]:
 
If you want to do to df2 what you're doing to df1, do that.
 
i just change df_1 to df_2 currently
 
And does it not work?
 
10:31 AM
yes
 
i know nothing of python, but im coming here because this is like the only chat with people in it
 
@Starter HOW does it not work? I'm >this< close to giving up on this.
@TaylorSpark hello, it's the weekend. There are quite a few active rooms, but traffic is always much larger on weekdays.
 
supposed to generate plot for df_1 and df_2 but I can only generate for 1 at a time
sorry bout that
 
I heard python is similar to javascript... is this true? Im very inept into javascript, may join into py scripting one day
 
@Starter write a function that does what you're doing to an input dataframe, pass it df_1 first then df_2
@TaylorSpark no.
 
10:33 AM
oof
 
I don't know who said that, but it's not true
 
I want to be able to generate both plots at once but not sure how to do it without changing df_1 to df_2
okay
 
@TaylorSpark for instance python can't do this:
>> 1 + '2'
"12"
>> 1 - '2'
-1
 
the extent of similarity probably starts and ends with the fact that python and javascript both enjoy treating just about everything as objects.
 
I guess so
 
10:35 AM
Other than that, they're as close as two programming languages are. All programming languages have some basic constructs and ideas.
 
Honestly very few languages are "similar to" others, when speaking in terms of pointless generalities.
 
after that point, the similarities end.
 
In terms of language accessibility, they're not as complicated as something like Java or C++, but Python doesn't help me a whole lot in getting my head around JavaScript when I need to use it, beyond programming concepts
 
Ive only seen a handful of py scripts (mostly from botting/AI programs) so i really dont know much about it. I just got into javascript because it was light, supposedly "small," and alot of people said you could make pretty much anything you want with it
 
at least it's ubiquitous
 
10:37 AM
I wish i had gotten into things like html/css/js at a younger age
 
So do I, beyond trying to customise my myspace with guesswork. But it doesn't take too long to get up to speed enough to have things that are functional
 
im just now starting to master the basics of js, i pretty much know everything about html, and Im still learning css animations. If i had started younge, its possible i couldve mastered all three and gotten into other languages like C#, py, swift, json, java
I hear some people can "convert their javascript projects to python projects when libraries are needed or things go wrong"
I dont know honestly
But python is probably on my to-do list
 
json is not a language
 
sorry added that in there
i relate json/nbt/and java alot
 
JSON comes from JavaScript, not Java
 
10:40 AM
and JS comes from java, right?
 
Honestly Ive never researched it
I just know about json because i work with java programs
 
hint: the JS in JSON stands for JS
 
@AndrasDeak ugh :P
 
@AndrasDeak laurel. i mean, frankly, i blame the names. It was a surprise to me when i first learnt about java and javascript.
why would anyone willingly do such a thing? .. and then i guess i kinda found out why
 
The name was deliberate
 
10:41 AM
Json's tend to pop up in pixel animations, rendering software, three.js / webgl 3d Scenes and other such things
 
well if you look at the language it's completely in line in terms of sanity
 
aye. riding on the hype bandwagon so to speak
@AndrasDeak ha! can't argue with that :P
 
LOl I remember that! When i first started javascript, i always thought it related to Java
 
Yeah xactly. mee to
 
@TaylorSpark JSON is basically everywhere
 
10:43 AM
might go back to working on this: https://codepen.io/SkylerSpark/pen/zVqYbW
its like a little performance tools project Im making for my school tomarrow
 
Thank you @AndrasDeak. I did it
just needed to write a function
 
great
 
@roganjosh Yeah i see it alot, sometimes I see it in package.json style when working with my javascript projects, but i never pay much attention to it
 
The Matrix was just JSON payloads being decoded badly in a Windows command prompt
 
I still need to finish the js then pretty everything up
I always write js messy
 
10:45 AM
@roganjosh causing people to be stuck in machines as batteries is one heck of a remote execution vulnerability
 
@roganjosh lol never knew
 
@AndrasDeak Front-end validation. Billions of sleeping guards
 
@TaylorSpark please stop starting to look like a spammer
 
Kinda chunky, but its smooth, which makes it a little less power hungry
Lol sorry
 
10:48 AM
@TaylorSpark Well, there are some similarities in the basic syntax because they're both in the "family" of languages inspired by the syntax of C. But the "Java" in the name "JavaScript" was chosen because at the time Java was being mainly used for writing apps that run on Web pages, and JavaScript was created to write scripts that run in Web pages, without the hassle of writing a Java app.
 
Ah i see
I never really bother researching things like that
I guess Im just lazy
but yeah i always thought they were somewhat similar
the syntax of a decrypted java class file is pretty basic like js and other syntax braced languages
 
TL;DR: "Java" is a buzzword roughly meaning "Web-related".
 
and for some reason it also reminded me of C#
 
A decrypted java class file?
 
.class
you find them in .jar's
 
10:50 AM
C# and java look a lot more similar than JS and java I think. But I don't speak either.
 
Sure, C# is closely related to Java.
 
honestly most languages have the basic () {} seperators
so at times i cant really tell
 
judging syntax by () and {} will definitely not tell you anything about the languages
 
Well obviously
thats just a common framework for most languages
 
10:54 AM
No ones in js atm
thats why I came here
 
that just means you have to wait
 
we're used to python... please go easy on our eyes and don't post code like that (messy code, I mean)
 
lol rip, Well i guess ill go play a video game
 
sounds like a plan
 
C# is kind of Microsoft's imitation of Java, although in various ways it's closer in design to (a subset of) C++. Microsoft has a habit of taking stuff that's in general use and making their own slightly different version...
 
10:55 AM
@TaylorSpark you're welcome to talk about not-JS here, otherwise have fun
 
is it just me or do IntelliJ updates have a higher chance of breaking something than fixing something?
I've updated from x.1.1 to x.1.3 no less than 3 times now
 
@ParitoshSingh what are you doing here lol, and not seeing India bat
 
because apparently the update doesn't complete properly
 
@Aran-Fey try x.1.2 or x.1.4 :P
 
I can't be bothered to re-install the whole thing... I think I'll just turn updates off...
 
 
2 hours later…
12:40 PM
Is this an efficient way to split a text string for every third dot '.' ?

new_text_arr = []
dots_seen = 0
slice_start = 0
for i, c in enumerate(text):
	if dots_seen == 3:
		new_text_arr.append(text[slice_start:i])
		dots_seen = 0
		slice_start = i
	if c == '.':
		dots_seen += 1
 
@Sebastian umm... every third dot or just on the 3rd dot... looks like you're missing resetting a counter (or should be using modulus there...)
 
@SebastianNielsen it's pretty straight forward
 
after every third dot*
 
if you're fine with regex you can also use ([^.]*\.[^.]*\.[^.]*\.) instead with finditer, it should be a little less verbose
 
Nice solution!
Much more neat than what I wrote
 
12:49 PM
Regex always feels like black magic to me
 
oh, it is.
 
sure is
 
Though we have a better explanation for what it is pinned in the room.
 
    a = re.finditer(r'([^.]*\.[^.]*\.[^.]*\.)', text)
    for i in a:
    	print(i.group(), '\n')

does the exact same thing as what I just wrote above, regex is amazing.
 
they both don't exclude each other
 
12:50 PM
In [5]: s = '1.2.3.4.5.6.7.8.9.10'

In [6]: [m.group() for m in re.finditer('([^.]*\.[^.]*\.[^.]*\.)', s)]
Out[6]: ['1.2.3.', '4.5.6.', '7.8.9.']
 
@ParitoshSingh What's pinned in the room re: regex?
 
A good programmer should never be afraid of getting a little blood on his pc
 
Might want to be wary of that missing 10 in the string...
@3141 as long as it's not your own? :p
 
@roganjosh oh nothing, meow and stuff. ;)
 
12:51 PM
wow nice one liner
 
@ParitoshSingh Well, that's my theory, but it was never pinned, just starred IIRC. People keep going with their daily lives, not realising the true threat
 
@SebastianNielsen we still don't like expletives here
 
ah oops. i suppose in that case i don't even know what pinned messages are. i just thought of the two as synonyms in my head. But yes, it's a real threat, that one!
do we have pinned messages here?
 
My understanding of pinned messages are like the ones from Jon and Andras currently. Neither of which will matter when the feline overlords take over
 
12:55 PM
(oh. the hollowed stars vs the darkened stars? Just really noticing that now)
 
yes
 
aha nifty! won't help us when the feline overlords take over and knock things off of there. Seems to be in their nature.
but oh well, till that day i suppose.
 
"I see you have a docker container. It would be a shame if I... pawed it off your stack"
 
just out of curiosity, why no expletives?
 
@SebastianNielsen That has a bug: If the text ends with a ., the last chunk will be omitted. i.e. it turns 'a.b.c.' into [].
Looping over single characters definitely isn't the fastest way to do it either
 
12:58 PM
@3141 people have this chat open during work, for example
 
I suppose another option (although not a great one, is using re.sub and split.., eg):
In [25]: re.sub('(\.)', lambda m, c=itertools.cycle(range(3)): '\t' if next(c) == 2 else m.group(), s).split('\t')
Out[25]: ['1.2.3', '4.5.6', '7.8.9', '10']
But can probably go with a re.findall I'd imagine...
 
This also works:

x = '1.2.3.4.5.6.7.8.9.10.11'
a = re.finditer(r'([^.]*\.[^.]*\.[^.]*\.)', x)
for i in a:
	print(i.group(), '\n')

print(re.search(r'(?:[^.]*\.[^.]*\.[^.]*\.)*(.*)', x).group(1))
output:

1.2.3.

4.5.6.

7.8.9.

10.11
 
@JonClements with the subtle bug of splitting not only on dots, but also tabs
 
But I guess it is quite insufficient
 
@Aran-Fey meh... just using tab as an example... just any character that isn't going to be in a string... null or unicode_max or whatever...
 
1:01 PM
 
@SebastianNielsen tbh, I liked your initial one better
still trying to understand jon's..
 
@Arne basically it replaces every 3rd . with another character and then splits on that character... not recommended but popped into my head so thought I'd share it anyway...
 
Arne, my initial code was bugged though, given an input of x = '1.2.3.4.5.6.7.8.9.10.11'

The output is:
1.2.3.

4.5.6.

7.8.9.

It fails to include the remaining text.
 
you can probably rectify that too.
 
In [35]: s = '1.2.3.4.5.6.7.8.9.10.11'

In [36]: re.findall('([^.]+(?:\.[^.]+){,2})', s)
Out[36]: ['1.2.3', '4.5.6', '7.8.9', '10.11']
 
1:08 PM
Woah, that looks very cryptic
 
yeah, don't mind us, we'll be diving into more and more cryptic rabbit holes here until we're done. they usually go in decreasing order of recommendation for daily use.
 
@SebastianNielsen just wait until you see that for a separator that's longer than a single character :P
 
@SebastianNielsen just mash all the symbol keys on the keyboard... that's generally how non-obvious regexes work :p
 
(?:(?!SEP).)*(?:SEP(?:(?!SEP).)*){,2} or something like that
 
1:12 PM
What the ... haha
{,2} indicates the given group should be captured a maximum of 2 times, right?
 
pretty much. Except it works on arbitrary expressions, not just groups.
like a{,2} is also perfectly valid
 
@JonClements oh, there is a piece of software somewhere out there where i did exactly that
I think I used %SPLITSTR% instead, since I didn't know enough about unicode back then to implement something that was also theoretically safe
 
my take
from itertools import zip_longest
x = '1.2.3.4.5.6.7.8.9.10.11'

def grouper(n, iterable, fillvalue=None):
    "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
    args = [iter(iterable)] * n
    return zip_longest(fillvalue=fillvalue, *args)

def nth_split(string, n, sep):
    temp = x.split(sep)
    for group in grouper(n, temp):
        yield sep.join(item for item in group if item is not None)

list(nth_split(x, 3, "."))
i stole* the grouper recipe for this. :P
 
Nice. Probably the most readable one so far
 
1:21 PM
though i dunno if it's as efficient anymore since it does take the splits through the whole string upfront. i presume we dont have a split generator though. could perhaps make one of our own for this task for another form of the solution
a lot less readable version imo if we remove the grouper and use indexes:
def nth_split(string, n, sep):
    temp = x.split(sep)
    length = len(temp) // n
    if len(temp)%n != 0:
        length += 1
    for i in range(length):
        i *= n
        yield sep.join(temp[i: i + n])

list(nth_split(x, 3, "."))
i just realised i could have taken the step size in ranges too. :/
def nth_split(string, n, sep):
    temp = string.split(sep)
    for i in range(0, len(temp), n):
        yield sep.join(temp[i: i + n])

list(nth_split(x, 3, "."))
that's the last one from me. but i think that's pretty okay too.
 
1:54 PM
@ParitoshSingh Definitely the easiest to grok and not bad at all :)
 
2:06 PM
guess the rain gods were happy in manchester today, only 15-20 mins of rain :)
 
The match is still live. It's running more like a cricket stadium weather report.
Ah, they're trying to remove the water now, I imagine they want to resume asap.
.. but it's still highlights discussion.
 
2:42 PM
I've got a question about writing tests: I'm working on a project that does OCR. Naturally, OCR makes a lot of mistakes, so my tests have to be a bit more elaborate than just assert ocr(img) == text. Basically I'd like to have more test outcomes than just "success" or "failure"... for example, something like "success with minor errors". As far as I know, pytest doesn't support that, though. Any ideas how I could go about this?
 
Is there a percentage match concept between what the text actually is and what the ocr achieves?
Like what’s the tolerance on how many characters were matched, how many were matched correctly
 
I could implement something like that, but I'm not sure how I should output it. Say I calculate that the match is 70%... what would I do with that number?
pytest.fail("70% match")?
 
What’s the acceptable criteria for your project
assert matchedchars/totalchars >= 0.7 maybe
 
Well, that's a little complicated. I'm reading 5 different attributes - attribute A must be 100% correct, attribute B is mostly irrelevant, etc etc
 
Well, you have to come up with some function that you assert results in OK/not... nothing to do with what pytest can do per se...
 
2:55 PM
I guess I shouldn't be using a test framework for this
I'll just write a plain ol' loop that prints the results of the tests
 
curious, if you don't mind me asking, you're doing this with tesseract?
 
@Aran-Fey What about xfail? Looks like you should be able to get three statuses using xfail and fail.
 
@ParitoshSingh yeah. I'd made good experience with tesseract, but in this project it's turned out to be more fickle than I thought
 
That's kind of to be expected with any OCR system though? :p
 
Well given any number of attributes, each of them must fall within a given threshold
 
3:10 PM
@Peilonrayz Hmm, I think having only 3 result states doesn't let me express the outcome of my tests well enough... I'd like to have at least 4 different outcomes, I think
 
A lookup table of some sort is enough
 
Well, in the past I've used tesseract to read a couple of unusual fonts on noisy backgrounds... and this time I've got nice black computer-generated text on white/gray background... so I really didn't expect to have many problems
 
Why would you need 4? Would success, within acceptable and out of acceptable not work?
 
@Aran-Fey oh - right then... that's not what I'd expect either :)
 
is the font an uncommon one? something tesseract might not have seen before?
 
3:16 PM
nah, it's nothing unusual. I think it's Arial
 
yeah... no one uses that font :)
 
I learned that tesseract can read numbers with 4 digits no problem... but numbers with 8 digits? Nope. Impossible. Unless I scale them up by a factor of 1.5x. Then it can read the 8-digit numbers, but can't read the 4-digit numbers anymore. Fun.
 
user10984358
3:57 PM
Has anyone here even remotely tried the objection detection tutorial code from tensorflow?
 
user10984358
from what I gathered it downloads a pre-trained model to do the prediction, my question here is will a model always be downloaded for every single execution of the code, I am asking this because the code fails to compile when I turn my wifi off
 
4:32 PM
How I can read a string like "ABCD" from a file and store it like a list?
 
@taritgoswami do you know how to open a file and read stuff from it?
 
Well - that's a good start... and you can make strings into lists by using list... eg list('abcd')... put all that together and you should be good...
 
so list(f.readline()) will work?
 
try it :)
 
4:43 PM
 
@rogan curious you asked for a cv-pls when you hadn't voted yourself? :p
 
Good point and not one that went unnoticed. I was distracted by faffing on a phone to try close it by tagging here
It was an oversight on my part, but was closed by the time I revisited, by which point you'd closed it.
 
no worries... I just imagine most people close vote it then request cv-pls :p
 
I was more concerned that another pile of unformatted text was being dropped as an answer. I'm not great at multitasking with SO on my phone :/
 
4:58 PM
fair 'nough :)
 
Not least due to my very public fall where I smashed my phone into the tarmac on the busiest road in Manchester. I've never recovered that dignity:P
 
youch... :(
 
Nor has my phone been the same since
 
I'd imagine it's quite unhappy with you :)
 
It was a classic face-plant in the middle of Oxford road. I only hope that someone captured it on camera and had a good laugh; I would if I could see it
 
5:04 PM
Sounds like it's a shame that You've Been Framed isn't really a thing anymore... although I'm still waiting for Beadle to come back and go: "haha... got you suckers!"
 
So many staged things with that show. This was raw humiliation :P
 
Well, when it first came out, it was good.. but obviously, people caught on and there were obviously clips that you just knew were faked...
 
5:25 PM
@roganjosh it's valid but OP can't copy-paste
 
I've dropped out of that convo
 
Puhleeese close it before more comments and answers crop up
 
It is closed
 
Thanks. And with a reopen vote, ugh
 
It's gone now
 
5:35 PM
Phew
 
5:54 PM
^ sorry not a dupe. the op just didn't look into the warning message, leading to derailing their real question. having said that, this is just another ML question. those things almost never have an mcve.
 
question is edited now
removed closed vote, the major part of the question was inclined to pandas Setting with copy warning
:)
 
can you move my msg too? its out of context now
 
6:10 PM
Umm... Well... enjoyed Season 3 of Jessica Jones more than I did Season 2...
 
6:34 PM
Poll: When clamping a variable, do you use min(0, x) or min(x, 0)? And max(10, x) or max(x, 10)?
 
what's clamping?
 
making sure it stays inside a range (0-10 in the example)
...except I screwed it up and it should've been max(0, x)/max(x, 0) and min(10, x)/min(x, 10)
 
Hey guys I have quick DRF question
One second while I past my models
 
(removed)
 
please use dpaste.com for longer code
instead of cluttering the chat
 
6:41 PM
I think the paste is just a little weird one sec
So basically I created a reverse relation items which is trivial to serialize as a list nested within the system serializer
However, what I'd like to do is make the items be key values pairs in an object
i.e. a system would look like this
{"name": "ABC", "items": {"1": "Y", "2": "N", "3": "Y"}}
where the keys of items is the release and the values are the support field
Basically I want to serialize as a dictionary rather than a nested list of another serializer
@DeveshKumarSingh Does that make sense?
 
@Aran-Fey i personally prefer variable first
 
Basically construct the dictionary in a method and return it
 
Hello guys, I am trying to connect to mongodB using "myclient = MongoClient("mongodb://user:password@:ip:port/")" via Putty, but it is giving
ValueError: Reserved characters such as ':' must be escaped according RFC 2396.

Any clue on how to avoid that? I have already used escape characters.
 
6:56 PM
@MalikBrahimi Sorry I do not know django
 
@ParitoshSingh Great, the opposite of what I usually do :D
 
@Shivanshu check this out
 
:D it's kinda funny thinking about something like that, i haven't really even paid attention to it before
 
@Aran-Fey I always put x first
 
02:00 - 19:0019:00 - 23:00

« first day (3165 days earlier)      last day (1788 days later) »