« first day (3414 days earlier)      last day (1539 days later) » 
01:00 - 16:0016:00 - 00:00

wim
1:16 AM
sometimes when i face that error i add os.chdir(os.path.dirname(os.path.abspath(__file__))) to the main.py file — Jeril 2 mins ago
🤦
 
 
2 hours later…
3:37 AM
@MisterMiyagi yeah it is
Oh no , am I too late to reply the msg.... So sorry
 
 
3 hours later…
6:09 AM
In python3, when using json.dumps, do I need to consider using ensure_ascii true/false?
If ensure_ascii is true (the default), the output is guaranteed to have all incoming non-ASCII characters escaped. If ensure_ascii is false, these characters will be output as-is.
Please can someone give me an example of this
 
user10984358
6:28 AM
Didn’t you answer your own question?
 
6:46 AM
cbg guys o/
@VentusZXC biggest mistake of the decade.
 
wim
as an example, if you dump 💩 with ensure_ascii off then you will see just 💩 , and if you dump it with ensure_ascii on (which is the default) then you will get the escape sequences e.g. "\ud83d\udca9"
 
7:00 AM
Based on what do we make decision to turn it on/off
I am trying to udnerstnad the end goal
 
I'm not sure either, but setting ensure_ascii=False makes the JSON more human-readable
 
One situation is where the json has to be ingested on a platform that can;t handle non ascii. Usually around web pages designed poorly and stuff like that
If that isn't a factor for you, then you don't need to worry about it
 
wim
7:21 AM
depends on the transport and the decoder I guess
 
8:11 AM
cbg-ning
 
8:26 AM
def fun_test(self, value1: class_name_here, value2: str): In this code, the part after : is the type of the argument. right?
 
yes
 
In POSTMAN, to test a POST endpoint, I attach a file select POST, enter the url and hit SEND. In python code, when I want to make a POST request from code, I do -> request.post('url', data=file_contents,...) The value of file_contents is obtained by reading the file using open(..) as file; file.read(). Is this right way to fire POST request? I am trying to simulate a user making POSTMAN type of request via python code. is this correct or there is another way?
 
There's a files argument that you should be using
 
But this way also works. Is it incorrect?
 
I don't know enough about HTTP to answer that
 
8:35 AM
Not to worry, variable will ask 5 different questions in a jiffy
 
Maybe the only difference is that using files results in a streaming upload
 
@AndrasDeak it is tough to keep abreast of their workflow :) I imagine an office of people running around in panic. Lots of mugs of tea being spilt
 
@Aran-Fey 2.python-requests.org/en/v1.0.4/user/quickstart/… - either ways (files or data), it seems to need opening the file
 
well, yeah, you can't read data from a file without opening it
 
Why are you trying to "simulate" someone making a POSTMAN type of request, when that's exactly what you're doing? And why do you anticipate requests from Postman?
 
8:51 AM
this Q "python set vs tuple lookup. is Lookup in Tuple O(1)?" is interesting yet has some very misleading answers. However, the Q test refers to some deleted comments. Is it possible to retrieve deleted comments to piece together the entire Q?
 
an admin might be able, as long as the comments weren't self-deleted by the author
 
@MisterMiyagi no
well, what Arne said, but s/admin/mod and they'd never do that
 
@roganjosh writing load tests
 
Can your server understand the contents of the request? If so, I'd say that the body of the request is fine. requests works in a serial fashion, though, so you're not going to simulate high loads
You could use requests-futures to bombard your server with asynchronous requests. There's probably a better way, but that library immediately springs to mind because it's maybe 3 lines of code to set it up
Bottom line, though, is that requests simulates a single, greedy, user at best. It won't help with load testing
 
9:11 AM
@roganjosh I am using Jmeter for this
@roganjosh sorry i mean regression test
@roganjosh - in flask POST endpoint, can you guide me how to prevent malicious user from uplaoding large files, if intention is to crash server. So either block files larger than 50MB OR if larger than 50mb then use some chunks concept? What is the general convention followed in such case
 
No, I'm not guiding you through anything in detail because it really is an endless stream of disjointed questions with you. What I will say is that I dont think it's Flask's job to do that and should be handled by something like nginx.
 
ah ok
 
If your learning is driven by soundbites of chat, you're going to have a terrible product btw. We're just responding to isolated questions and can't see what you're building (that's not a cue to post it). You really need to start researching issues in your own context
 
9:27 AM
Ofcourse
I am thanks for tips
 
https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py
I am working on this project and I want to compare the face_names with some names I created in a txt file, any suggestions?
 
9:55 AM
Guys I have been looking for something but I cannot find the answer I want, how do I create a new column every iteration? (in pandas)
 
New column of what?
 
I add some values I know how to do that, but I want to create a new column in each iteration and then fill it up with the values I have
 
You're going to need an MCVE
 
@VentusZXC That sounds easy enough, what exactly are you having trouble with?
 
Does anyone know why a static method is accessible using self.staticmethodname?
I thought it should be only ClassName.staticmethodname
 
9:57 AM
Because all class attributes are accessible via self
 
Ok.
 
@Aran-Fey Im having trouble to write :/
 
What trouble? Please be specific
 
staticmethod only affects the implicit self argument, nothing more
 
@roganjosh look this is what I am doing now and I want to put every time I run the code the values to a new column
for i in df2.iterrows():
    for  k, v in dictionary.items():
        if i[0] == k:
            df2['new_column'] = dictionary[k]['value']
 
9:58 AM
I got no idea how to write the program to compare
 
@VentusZXC what does that have to do with writing to a file?
 
Uh...recabbage. I think.
 
@Vasilis ack, why aren't you using .map()?
 
@VentusZXC "compare" is too unclear for us to help you. Does it mean file.readlines() == known_faces or does it mean set(known_faces) & file.readlines() or what
 
hmm what is that? I will google it
 
10:00 AM
@AndrasDeak save yourself!
 
aaa okay to match them, but then I want to pass that value to a different column in my dataframe every time I do it
so again I face the same issue, right?
 
@roganjosh Im not writing to a file. I have a txt file that has names in it, and I want to compare the face_names with the names I have inside the txt file....
@Aran-Fey Sorry I have no idea what does file.readlines() do
 
Start by reading the contents of the file, then your problem becomes "I want to compare a list to another list"
 
No, I dont think so @Vasilis. The iteration of a dataframe should set off an alarm bell, and the iteration of a dictionary within that loop should set off a fog horn.
 
Ah. Well then you seriously need to do some research about working with files.
 
10:03 AM
okay then thank you I will work on it
 
map() is the best way forward. If you give me an mcve that sets up the problem, I'll spare my mobile internet to tether my laptop and answer. Otherwise it's not worth it because I would be guessing at the requirement
 
@Aran-Fey Yes exactly but its not a list, its like comparing one by one because afterall it is comparing one name by one name
Is my answer still unclear T_T
 
yes. I don't know what the difference between list1 == list2 and "comparing one by one" is. I'll wait for you to do your research, implement the results of that research into your code, and then ask your question again if you still have trouble
 
@Aran-Fey Yes the reason I want to compare list1 and list 2 is because inside list 2 I will group the names into 2 groups, A and B. Say if Jane is in both lists, and list 2, Jane is in Group 1. so I will print out a command that Jane is in Group 1
Something like that...
 
@Kevin thanks for the help, I learned something about mime types and stopped trying to access the data as a form. That fixed it =)
 
10:15 AM
How did you group the names? Is list2 a list of lists?
 
@VentusZXC Whenever you have a use case of ""for some thing in A, find the same in B", consider using dict instead of list.
 
list 2 is a table, of sorts, like:
Group 1 Group 2
Mary Jane
James Lily
 
That tells me absolutely nothing. What kind of data structure is this table of yours?
 
@Aran-Fey What do u mean by what kind of data structure? Erm... are there any kinds?
@MisterMiyagi Oh let me have a search
 
If you say it's a list or a dict then I know what that means because python has a list and a dict class. But python does not have a table class. What on earth is a "table" and how do you work with it?
 
10:21 AM
I put my laptop and some books on one. Often a cup of tea too. They're quite easy to work with, tbh
 
Okay let me explain what im working on . I have a python server that does facial recognition, this system is used for attendance system. So after recognizing the students' faces, I want to write a code to determine which class does the student belong to.
Thats why I came out with the idea to compare both list, comparing names with folders =(
 
@VentusZXC this isnt addressing the question. Aran-Fey is not looking for a high-level overview of the project, hes asking specifically what the data type of the "table" is. Is it a dataframe? Is it a nested list?
 
Folders? Why folders? What role do folders play in this?
Is each folder supposed to be one group of people?
 
@roganjosh Erm dataframe
 
Right, so we need to stop referring to it as a list
 
10:28 AM
@Aran-Fey no no folders anymore, I misunderstood it
@Aran-Fey i have several folders where each folder represent 1 person
@roganjosh yeah
 
You need to be specific in the language you use. So, we're now working with a dataframe, which means I've totally lost the premise that you started with. You're now talking about 2 columns in a df?
 
*throws in "array" for consideration*
 
Begone!
 
@roganjosh Yeah! Sorry about that :X
 
Hello Everyone
 
10:31 AM
hello
 
There is no need to be sorry. However, it's perhaps best to stop here for a bit, regroup mentally and decide what it is, specifically, that you need help with
 
So you have 1) a dataframe where each column is a group of people and 2) the name of a person, and you want to find out which group that person belongs to?
 
Yes
 
Okay. I don't know pandas, but I can't imagine this being overly difficult.
 
Do you have the same number of groups as people?
 
10:34 AM
Can anyone suggest me ...best way to encrypt credential and use in Python Script
 
That's...weird. Or if each row is a single person with name | group, then there's nothing to look for
@VentusZXC oh dear me, you are the one with the facial recognition problem. Ignore what I've said, I'm not even here. (For reference)
 
@saffron encrypt for what? Storage of a password in a database? Transfer of credentials over a network?
 
On second thought, storing groups as dataframe columns doesn't make a whole lot of sense. Especially if each group has a different number of people.
 
Nope, it doesn't
 
@AndrasDeak let us assume we have
 
10:36 AM
@roganjosh Transfer of credentials over a network
 
@AndrasDeak yea thats me :X
 
i Have to use that credentials to login to a server and get the data
 
This is covered by TLS
 
@AndrasDeak The thing is i do not have much time, I would love to learn but I have only until next weekend
 
@VentusZXC I understand that
 
10:39 AM
@saffron What kind of credentials are these? Does each user of your program have their own credentials? Or is it something like an OAuth2 client_secret that belongs to the program itself?
 
hello
 
Iam facing an issue
when iam doing df.index = indexes and indexes = ['cc+', 'abc']
df.index is getting changed to ['cc', 'abc']
where df is a dataframe of pandas
 
@Aran-Fey There is some url from where i have to get data...using get requests
@Ara
 
>>> df
   a
0  1
1  2
>>> indexes = ['cc+', 'abc']
>>> df.index = indexes
>>> df
     a
cc+  1
abc  2
@PiyushBiswal I can't repro ^
 
10:45 AM
iam able to reproduce this with python3.7 version
 
So please provide an MCVE.
 
@saffron That's... not what I asked though
 
@PiyushBiswal and I can't
 
@Aran-Fey own credentials which has access to set of Repositories
 
Who's "own"? The user or the program?
 
10:48 AM
user
 
@saffron credentials is an extremely broad term. What kind of credentials? passwords? certificate? token?
 
it is passwords
which i will include in the script
 
Okay. In that case I know two solutions: 1) Store the credentials in the user's keyring or 2) Store the credentials in plain text somewhere on the hard disk
 
What?
 
Fun fact: git uses option 2
 
10:52 AM
@saffron and your task is to do precisely what? Send the encrypted password to a server with an unencrypted connection? Send the unencrypted password to a server with an encrypted connection? What protocol do client/server speak?
 
@MisterMiyagi Send the unencrypted password to a server with an encrypted connection
 
The protocol is HTTPS then, yes?
 
@MisterMiyagi Yeah
 
So then we go back to TLS that I started with. You need https
 
I used basecode64 module. But it can decrypted easily. So i dont want use that
 
10:55 AM
@saffron Then en/de-crypting the password is not what you have to do.
HTTPS/TLS does the en/decrypting of any data sent for you.
 
Why does the protocol matter? The server expects a HTTP request with specific contents, and you have to send it what it needs. Doesn't matter if TLS is involved or not, does it?
 
What if there is a sniffer on the network?
 
'course, it makes a difference from a security standpoint. But if you want your program to work then you have no choice but to send the server what it needs, TLS or not
 
How to use this TLS or HTTPS here
 
Unless you're communicating with your own server, in which case you have full control over how the HTTP requests should be formatted
 
10:59 AM
@Aran-Fey There are other protocols than HTTP around. ;)
Admittedly, HTTP is probably correct in 99.99999% of cases where the author doesn't know.
 
Sure, but the server expects a specific request sent through a specific protocol. The client has no say in the matter. You just have to do what works.
No point in being secure if the server responds with a code 400
 
I have a feeling that this discussion is way above what they originally asked. I dont have a clear understanding of what they're doing
@Aran-Fey well that's still network traffic. The credentials had to be sent with the request
 
import requests
import json
import warnings
warnings.filterwarnings('ignore', message='Unverified HTTPS request')
def requestcall():
for p in range(30):
headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' }
headers1 = { 'Authorization': 'Splunk dfgsdgwerfgwegfwg', 'Content-Type': 'application/json', }
params = (
('dql','select r_object_id, object_name, subject, is_inactive, a_current_status, a_last_completion , a_next_invocation, a_last_return_code from dm_job where is_inactive=0'),
Above is the code i have written
Here you can see that i am passing user and password
 
You're explicitly ignoring the warning?
 
if someone opens the script, they should not get the password
 
11:04 AM
@roganjosh Not sure what you're getting at. So what if the credentials are included in the request?
 
@roganjosh thats because...in my testing environment i have some restrictions
 
@saffron I thought the password belongs to the user? How can opening the script reveal the user's password?
 
In production..i will remove and run
 
@saffron This implies that you want to encrypt the password which is stored inside the script. Which is different from what you seem to have requested so far.
 
I think I wanna back out. I'm not sure what we're even discussing at this point. Now they want to obfuscate a password in a script, so we're probably all on different pages
 
11:06 AM
sure looks like it
 
@MisterMiyagi Sorry that i am not clear in what i am requesting
 
@saffron Please try to clarify it, then.
 
As you can see in the script, i am passing the password directly like( auth={user344, 'dffasda'), right?
Instead i want to encrypt it, and while passing to the get requests it should be decrypted
data1 = base64.b64decode('RDB1Y76GFANg==')
print (data1)
 
That wouldn't be possible. Whatever method is used to decrypt the password when sending it would be exposed to anyone opening the script
Presumably you're looking to distribute this script and you don't want people to know your login details that have to be baked into the code?
 
@roganjosh we can say that
 
11:19 AM
Ok, so we've just been dancing around an XY problem. You can't do what you want to do
 
Yup. No matter what you do, someone can just fire up Wireshark and find the password in the HTTP request you send to the server.
 
saffron should first clarify what kind of agent they are trying to protect against
 
the script will be placed in a monitoring tool, where it will be scheduled to run every 2 days or something
 
that's a non sequitur if I've ever seen one
 
From our side, i want to make sure the password is not exposed
 
11:24 AM
okay
 
if someone opens it accidentally
 
@saffron Can any user log in or is this a predetermined account? If it's the latter I'd suggest token authorization
 
it is predetermined account
how to use token authorization
 
So the security layer is surely that only the people who already know this password would see it?
 
Yes
 
11:31 AM
Ok, and the monitoring tool is 3rd party?
 
cbg
 
@roganjosh No .It is our tool which we use to monitor all the data, dashboard kind of thing
 
To the best of my understanding, the analogy is this. You want to upload a script to a company github account that's accessible by 10 people. There's a password baked into the script that 8 of those people shouldn't know. It's python, so it can't be compiled into nonsense. You want password = <some gibberish> that gets unscrambled by the actual code when it comes to sending the request
 
Yeah you got it
 
It can't be done. The decryption has to exist prior to the request being sent, and by it's very nature, the method of decryption is also just as visible as a plain password would be.
It's just an extra step that someone has to take, but it's not a barrier if anyone actually wants to abuse those credentials
 
11:40 AM
Okay then. Thank you
 
If it was just github then you could ignore the file that contained the credentials, but your code actually needs to run in this repo
 
Ok
 
12:06 PM
Fresh cabbages everyone
 
@saffron Does said monitoring tool allow you to locally store credentials? E.g. can you securely store a file, or encrypt environment variables?
 
Actually, I didn't think about file permissions, so I guess that could be one route, though it still leaks info to the person responsible for the monitoring tool
 
Well, every security measure hinges some base level of trust. It's just about finding that base level and stacking turtles all the way up.
As a collaborator once put it: We don't trust <your organisation>. We trust <your security guy>.
Then <our organisation> refused to extend <our security guy>'s contract, and the rest is history...
 
12:31 PM
Fun fact: I've just had to explain to IT why one person's dashboard I built has a load of gifs of people in t-rex costumes doing things like trampolining and fishing. I expect my privileges to suffer now
It wasn't exactly helped by the person saying that they didn't know how the gifs appeared, rather than just say that I deliberately linked them to their account. At least there's no meltdown about security
 
So that person originally requested those gifs and then threw you under the bus? That's lame
 
It's a factory-wide joke on the shop floor. Sadly they were still logged in when IT came to change the monitor. I think that they said "I dont know where they came from" in a genuine attempt to bail me out but it has the opposite effect
 
Ah, I see. Unfortunate. Did they make you remove the gifs?
 
Actually no, but I dont know whether I caught the issue in time before it got escalated to the **** of the IT manager
 
Sounds like they don't mind you having a bit of fun, you should be fine
 
12:49 PM
We'll find out tomorrow :P the guy that spotted it set up the gitlab instance for me and found it in the code so hopefully he did that before mentioning it to his manager
 
Cbg
 
1:10 PM
Fresh cabbages Paul.
@roganjosh It's just your own version of the cats and corgis in google colab, if google itself can do it, it would be counter-innovative if you guys didn't step up ;)
 
Perfect counter-argument :) I mean, I'm a contractor and it's my job to keep them at the forefront of tech trends
It's my expectation that I'll be moving on shortly anyway. I was looking for a new job not long ago before I had to move house, which set things back a bit. The disconnect between the SMT and the workers is basically unbridgeable. Hence why I'm building pointless charts (yesterday's task but I cba going in today to finish it off).
 
I must confess I read (yesterday's task but I cabbage going in today to...)
Sounds good, I hope you have something in mind already, or maybe you could use some vacations in between the jobs. Did you ever try SO jobs' ?
 
1:27 PM
I haven't tried SO jobs though I frequently look at the postings lately just to see what they're asking for
This position has mostly just been open warfare. I've built some things that I'm really proud of (which is unusual for me) and stuck with it as much as I can to help the people working on the shop floor but, my God, is it testing my patience. 2 meetings I've had with my manager since August
 
I hope something better comes by soon :)
 
I'm sure it will, I'm not too concerned unless t-rex-gate gets me ditched instantly :P
 
user10984358
dont mean to hijack the convo but when you change jobs how comfortable are you with working on something new?
 
Perfectly comfortable. That's what engages me
 
user10984358
I recently managed to land a job even though I said I knew next to nothing in java, and I have been thinking of turning it down
 
1:35 PM
But you landed the job. Doesn't that tell you something?
 
There's a vacant COBOL position in my area and I've considered it more than once
 
user10984358
they were kind of satisfied with my python projects (considering I am an unexperienced candidate) I have been doing over the months and they expect me to work with Java once I join which I dont really think I would enjoy, thats why I asked how you would feel when you get a new job
 
If I apply, I intend to learn COBOL sometime after the interview and sometime before my first day
 
user10984358
lol, but recruiters believe to an extent that "If he knows language X he can learn language Y"
 
They're right.
 
1:40 PM
@TheNamesAlc my first programming job was a remote job, working from home, having no programming experience. But my answer is totally irrelevant because it's ultimately what you are comfortable doing
 
"Therefore, I will ceaselessly send him job offers for languages he's never expressed interest in" is where the recruiters go astray
 
user11585758
Here is my first chat, Hello stack overflow chat
 
Welcome
 
user10984358
heya
 
There is a gradient to the language transfer-ability concept though. C++ to Python is easier than Python to Haskell, probably
 
1:42 PM
I have attempted both those transfers, and you are correct
 
user11585758
I have error to ask please help

#Using normalization and dropouts
input_layer = Input((32,32,3))
x = Conv2D(filters=32, kernel_size=3, strides=1, padding='same', activation='relu')(input_layer)
print("without activation: ", x.shape)
y = Conv2D(filters=32, kernel_size=3, strides=1, padding='same')(input_layer)
print("without activation: ", y.shape)
x = BatchNormalization()(x)
x = LeakyReLU()(X)

x = Conv2D(filters=32, kernel_size=3, strides=2, padding='same', activation='relu')(x)

throws error
 
user10984358
@roganjosh I feel comfortable and enjoy working with python and I have much to explore before I can say I am at least half as good as the people in this room, so that gives me more reason, thanks!
 
Me too. It doesn't stop me being productive, though. The question is only whether you want to take the job offer
If the sticking point is that you think you'll be slow to learn Java, that's not a good reason. You can't be a great judge on your own ability to take up something new, and conscientious people will underestimate their ability. If the argument against it is that you don't want to learn Java and work with it then don't take the job
 
user11585758
guys
 
@roganjosh Where are you on the hypothetical Dunning-Kruger curve? (the one with the big spike and trough not the actual one in the paper). I have been on the trough for about half a year, not the best place to be.
 
1:48 PM
@god Seems like the shape of the data isn't right.
 
@god - you sure work in mysterious ways
 
It wants ndim=4 but you're apparently giving it ndim=2
 
user10984358
its more of the latter, been spending over a year in python envisioning a career in that and now "a wild Java appears out of no where" :/ really appreciate your inputs
 
@Dodge I am painfully aware of the enormous body of things I don't know. However, if someone asks me to build something, and I can visualise it in my head, I'll say "yes" even if I have no idea how to do it. I only need to be confident that it can be done
 
A quick google tells me that @god is using keras and/or TensorFlow. is that correct?
 
1:50 PM
@roganjosh "slope of enlightenment" nice :)
 
user10984358
@god I dont know if this will help but if it is by chance a copy-paste code and you are changing it to work with your dataset, I once had issues running with mine, but increasing my dataset solved the dimension error, I dont know how or why but it worked
 
(^^^ that's the same conclusion I came to, but I expect you want to hear it from god himself)
 
@god Here is a posted question that sound similar to your problem: stackoverflow.com/questions/49840968/…
 
2:01 PM
@Dodge I have failed many times. To the point of a deep depression that stopped me leaving the house. But, looking back, there wasn't a whole lot I could do and you begin to realise that there's a lot of dumb people around. Once you contextualise things objectively, the DK-effect subsides. As long as you're open to the fact there is someone that knows better to draw on (politely) you're ok
 
user11585758
oh thanks guys suddenly problem solved ,

I was training the Conv2D with activation 'relu' also after then using the LeakyRelu() for experimentation,

after removing the LeakyRelu it worked.
 
@roganjosh Yup, I think that is critical to the whole thing. It's fractal as well, daily DK curves vs a lifetime DK curve so there are many mini-successes to keep one motivated. Staying focused in one domain helps as well.
 
Well, I'm not too good at sticking to one thing :P
 
@roganjosh whatever happened with that dam? Guess they "fixed it" is the obvious answer...
 
Ahahaha. Don't be silly. They pumped it all out and now the problem just sits there
To put things into perspective in this area; we had a big pothole in the road with barriers up. People actually put birthday cards on the barriers when it was up for a year
I think they even gave the pothole xmas cards. <meanwhile China builds a hospital in a week>
 
2:13 PM
Man, Texas is one of the most laissez-faire governments toward construction in nation. Things are built or fixed fairly quickly here.
 
user11585758
so you guys are from america, I love america :) . I have dream to come there :)
 
Our local Gov'ts basically have no money so not a lot happens
No, I'm from the UK
 
@Dodge Hahahahahahahahahahahaha. Maybe in your neighborhood. I've been here a decade, and I don't remember a time when I-35 near me wasn't semi-under serious construction. Meanwhile back home they built 100km of trainline down the middle of an interstate, and barely interrupted the road at all.
 
user11585758
@roganjosh , developed country dont have money.
 
user11585758
I was thinking to become programmer come there and earn lots of money and be millionaire .
 
2:21 PM
Hard luck
 
@toonarmycaptain I knew that was coming from the Dallas or Austin folks. In my defense I said "fairly quickly," the Sagrada Família has been under consruction for about ~140 years
 
@god if you take the UK as a country (which you sorta can, at least for now) then there is a massive disparity in where the government money is spent.
 
@Dodge You realise I don't live in Austin or Dallas, right? I could walk to the I20/I35 mixmaster in half an hour. Maybe I'd have to jog.
 
My mistake
Lubbock is a far cry from the true metropolitan areas in the state, there is no doubt about that
 
@Dodge True. But, but like Westminster, Winchester, half the Roman roads, and unlike I35, that'll probably still be functional in 100 years without constant functionality-inhibiting refurbishment ;)
 
2:27 PM
Westminster, Winchester and the concept of Roman roads is just blatantly stolen from us. You guys need to pay royalties and then maybe we can fix the potholes
 
user11585758
but you guys @Dod
 
user11585758
but you guys @Dodge @toonarmycaptain what things are you talking about
 
Admittedly, I haven't lived outside of DFW in the US, but among people I know, government construction speeds/efficiencies in the US, and I-35 in particular, are something of a running joke. "I'll finish my degree with they finish working on I-35" etc.
@roganjosh I'll accept some royalties ;)
 
@toonarmycaptain you're paying them, right? The phrasing suggests the opposite!
 
@roganjosh My passport has a message from the Queen in the front, so I'll be accepting them on your behalf, since I'm local. If that's alright?
...or is it the back? I forget.
 
2:31 PM
How could you forget the personal signing from the queen?
"Dear toonarmycaptain. One is amused. The Queen"
 
@god There's a highway/motorway/big road I-35 that runs through our area that's perennially under construction. They always seem to be closing and fixing or rerouting parts of it.
 
user11585758
oh , hope it will get fixed.
 
@roganjosh To be fair, I have an Aussie one too, and I think one has that message in the front before the ID page, and the other in the back.
 
I think she signs "Lizzie" in the Australian passport
 
user11585758
Ok guys bye. great chatting with other peoples. I am from nepal . Bye guys . Have a good day . If problem araise i will ask help, please feel free to help me :D :)
 
2:36 PM
Aunty Lizzie, from memory ;)
 
I bet she goes and bakes cakes over there for you too. Ugh.
 
Mostly crumpets ;)
 
2:52 PM
There are some hilarious examples of complications due to roads & trainlines briefly crossing national or state borders in en.wikipedia.org/wiki/Enclave_and_exclave Eg, "Hopkins Road north of Newark, Delaware, briefly enters Pennsylvania where the Twelve-Mile Circle meets the Mason–Dixon Line. [...] The section of road in Pennsylvania is in rough shape, and it is unclear who is supposed to maintain this section."
@roganjosh Yeah. She's getting a bit too old to rebuild truck engines these days, and the technology has moved on a bit in the last 75 years. mashable.com/2015/04/22/queen-elizabeth-army
 
"one, two, three ... not it!" is the classic way of determining responsibility, wonder if they've tried that
 
@PM2Ring There's a "letter from the Queen" that does the rounds around July 4th about the Queen rescinding US Independence, the last few years I've been mildly disappointed it hasn't been accompanied by meme'd contrasts between the current President and the Queen in terms of military service etc.
 
I am reminded of the Yellowstone Zone of Death, a region where crimes are (in principle) not punishable because no court has the right combination of jurisdiction and jury demographic
"juries in federal criminal cases must be from both the district and state where the crime was committed. Because of this, a crime committed in the "Zone of Death" would be constitutionally required to be tried in and include only jury members from the Zone." -- But, alas, the Zone has a population of 0.
 
@Dodge There's a few bits of road around here where feels like that's what happened, like a mile or so of road that's for whatever reason not under State/Federal and maybe not under City responsibility either, so you have a more or less decent road, and then a mile of cracked and pitted rubbish, and then nice road again.
 
@PM2Ring she's probably the last real monarch we will have. Their family is disintegrating now. Tech has made pretty sure of this
 
3:03 PM
and some of the offspring
 
@toonarmycaptain There are a lot of contrasts between them. :) One of the first adjectives that people use when describing the Queen is "gracious". I can't imagine many people describing Trump that way...
 
@toonarmycaptain That sounds really annoying, but if you want to feel better about Texas roads take a road trip to Florida and explore the wonderful infrastructure of the American Southeast
 
@Dodge I have, it wasn't so bad, save for a few stretches in Alabama (or Mississippi maybe).
 
If I ever decide to abandon society and live in a cabin in the woods, I'll see if I can round up ~12 like-minded hermits to colonize the Zone of Death with me. Then there will be enough population for a jury, and we can rule over the land with an iron fist.
 
@Dodge crocodile-based infrastructure?
 
3:07 PM
Florida has some interesting geography, with underground waterways popping up & creating sinkholes in inconvenient places. :)
 
In opposite news, I think this is the most diverse and odd mix that I've ever heard. I'm not sure you could shove any more musical influences in to a song and be coherent (once it gets to the end)
 
@AndrasDeak 'Gator based
 
@PM2Ring There's a whole list there, even without devolving into political bias.
 
@toonarmycaptain welp, I'm out of bullets, you win, Texas roads suck :)
 
@roganjosh Looks interesting. I'll listen to it in a couple of hours. Right now I'm in the middle of listening to a 4 hour long blues program on the radio. Coincidentally, the program comes from Orlando, Florida.
 
3:11 PM
@Dodge Without making fun, I don't understand why they just seem to be not much more concrete dumped on top of the ground with asphalt on top. I mean, I'm sure there's a shifting clay ground reason or something, but back home I remember seeing a bunch of different layers of sand/gravel/etc.
In Perth (can't speak for the rest of Australia, I mostly caught public trasnport) the big contrast for me when I first moved here was how noisy the roads are...like back home when you drive, they're smoother or something, and so it's just quieter. My wife didn't believe me until she visited.
 
@roganjosh Probably. Politically, I'm not a monarchist, but I think she's a fairly admirable human being.
 
Re: the Queen rescinding US Independence. Prior to five minutes ago, I wasn't even sure that Great Britain had ever formally recognized the US to be free/sovereign/independent to begin with, in which case there'd be nothing to rescind.
This is either 1) commentary on how Americans mythologize themselves as renegades that don't care about the opinion of other nations; or 2) indicative of how little I personally paid attention to my US History classes in high school when they covered the Treaty of Paris
 
@Kevin there are many versions, but this is one: facebook.com/notes/scotland/…
 
I remember learning about the Boston Tea Party, and the Teapot Dome scandal, but nothing in between. Maybe only tea-related events can hold my interest.
 
@PM2Ring oh, it gets about as far away from blues as you can get :) my work/thinking playlist is all about noise and that song has enough layers to snare all my mental threads that aren't working on the task at hand :)
 
3:19 PM
@Kevin There's actually a fairly interesting discussion there about what is taught in US schools and what of US history is taught in other countries. My wife, admittedly not a fan of history class, has frequently acknowledged my family's grasp of US history as better than hers.
 
@toonarmycaptain I've seen that, or something similar, attributed to John Cleese.
 
@PM2Ring Me too. There's a few versions around, sometimes updated for current events.
 
@toonarmycaptain Guess my observations differ, a decade of work-travel in my 20s has brought me to love Texas roadways. After recent trip to Australia (Narrabri, Armadale, Sydney) I am left thinking that the roads are about the same as Texas.
 
Here's a fun fact about Texas, that I learned several years ago. I don't know how well it's known in the US. From en.wikipedia.org/wiki/Texas_divisionism
"Texas divisionism is a mainly historical movement that advocates the division of the U.S. state of Texas into as many as five states, as statutorily permitted by a provision included in the resolution admitting the former Republic of Texas into the Union in 1845."
 
@Dodge Probably. I didn't drive around Sydney much in the time I've spent there. Some of the regional interstates I've been on here are very nice compared to some of the roads going through the middle of Australia. That said, they probably get a truckload more traffic on them.
 
3:24 PM
@toonarmycaptain Hmm, can't say I like the negative attitude towards therapists in point #4 there.
Hot take: pursuit of mental health is good, actually.
 
@Kevin Stiff upper lip and all that, eh old chap.
@Kevin Absolutely no argument there.
Ha, I had to loop up Armadale (Armidale?) as there's at least one in a few states, fun fact, there is apparently a University of New England in Armidale, NSW, Australia.
 
If the argument is "the abundance of therapists in America is indicative of a lack of emotional maturity", then the arrow of causality is pointing the wrong way. That's like saying "it's a shame that there are so many cancer wards full of sick people. Let's solve this problem by shutting down those wards"
 
Ugh, python is so much better than VBA! <Shuts down VBA >
 
@toonarmycaptain Yes, a conference at the University of New England
 
@Kevin I think the gist is that instead of solving arguments and conflicts like civilised people, you internalise them and resolve them through therapy, shoot eachother, or sue eachother, rather than an insult towards mental health in general. Apparently, FWIW, the US has a higher rate of serious mental illness and lower treatment rate, compared to other developed countries, though, which is interesting, considering that stereotyping.
 
3:34 PM
But there is no standard line or objective measure to say: Okay from this point forward, issues needs to be resolved by yourself with therapy/meditation/etc... below this point, solve it with the counterpart via discussion/argument/etc...
Maybe a certain group of people haven't been taught how to deal with the issues in a healthy way with the counterpart that's why they need therapy, counseling, etc...
 
Or maybe people are held to account in ways that are so unbiological that it's impossible to cope with. Everything you do can be shared at any moment, you're surrounded by people sharing the good aspects of what is potentially a crap and painful existence, and "living the best life" has become a marketing tagline
 
I think it's important to remember in the context of that meme that it's meant to be humourous, and it's a fairly dry British humour at that.
 
Oh, I just jumped in without background context :P
 
I have a question that has lingered. Why does a dictionary return a weird non indexable object when you do d.keys()? I just want a simple list. I often dynamically create dicts with obscure keys and want to look at the first item to inspect but i cant do d[d.keys()[0]] and I wish I could
 
list(d.keys())
 
3:46 PM
My guess is because dictionaries are unordered, there is on point in indexing the keys.
 
@roganjosh I know but is there a why?
 
Same happens with sets
 
It's the same logic as range etc. It's a generator
 
@roganjosh it's not
 
Well, not a generator, I get confused over the terms here.
 
3:47 PM
>>> next({1: 2}.keys())
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-32-ef54fc0a8772> in <module>
----> 1 next({1: 2}.keys())

TypeError: 'dict_keys' object is not an iterator
just not a sequence
 
An iterable I think?
 
yes, but that's one of the broadest possible terms and doesn't explain why __getitem__ is missing
 
That's my way of living though :'( Broadest and undefined
 
So the idea is that it is more efficient to return something that is lazy and not a list?
 
yeah, it's a view
>>> d = {1: 2}
... keys = d.keys()
... d.pop(1)
... print(list(keys))
[]
 
3:50 PM
What do you think about the sequence part @AndrasDeak? My first guess is that being dictionaries unordered, there is no point in making it an iterator? Unless you force it with something like list()
 
Mmm, you're still calling list so I'm not sure what that illustrates
 
@roganjosh that keys was modified by the pop
that wouldn't have worked with a list
 
@CeliusStingher dictionaries are ordered as of 3.6
 
@roganjosh 3.7 if you want to be exact
@CeliusStingher list will also not give you an iterator
For a long time dicts were unordered by construction, so it made no sense to support "the third key". That's probably the main reason.
 
Implementation detail (3.6) vs. Guaranteed (3.7). Sure.
 
3:52 PM
cpython vs python :P
 
@Dodge "why" -> because most time, one doesn't want a list.
 
@AndrasDeak that would have worked if it was a list too, though? It's just rebinding to another name
 
Default dictionaries are ordered? I thought you could only make them that way with OrderedDict. Can anyone link me it? I've just finished reading what's new in python 3.6 and 3.7 and couldn't find anything regarding dictionaries and order
 
From docs.python.org/3/library/stdtypes.html#dictionary-view-objects "The objects returned by dict.keys(), dict.values() and dict.items() are view objects. They provide a dynamic view on the dictionary’s entries, which means that when the dictionary changes, the view reflects these changes."
 
I want to say "the devs won't go out of their way to implement a feature unless there's demand for it. Nobody* needs an indexable keys collection, so they made a non-indexable one instead" but even as I type it, it seems dishonest. If anything, defining a full-fledged dict_keys type is more work than just returning a list.
 
3:55 PM
@AndrasDeak there aren't any (notable?) Python3 implementations that don't have ordered dicts on Py3.6.
 
Maybe this part? "this new dict implementation in the language for a few releases before changing the language spec to mandate order-preserving semantics for all current and future Python implementations; this also helps preserve backwards-compatibility with older versions of the language where random iteration order is still in effect, e.g. Python 3.5)"
 
@CeliusStingher dict still isn't the same as OrderedDict. The former is built to be ordered, whereas the latter is also built for getting ordered.
 
I think the truth is closer to "we made this thing intentionally hard to do because you shouldn't want to do it", which is unfortunately not in line with the "we're all adults here" philosophy, but so it goes
 
Sure, it would be handy sometimes if dict views were list-like. OTOH, it is often handy that dict views are set-like.
 
01:00 - 16:0016:00 - 00:00

« first day (3414 days earlier)      last day (1539 days later) »