« first day (3182 days earlier)      last day (1991 days later) » 
03:00 - 15:0015:00 - 00:00

03:03
Hi
I have a dataframe called df which has a column called wiining and the values are like this 140 runs
33 runs
9 wickets (with 29 balls remaining)
5 wickets (with 6 balls remaining)
5 wickets (with 2 balls remaining)
I want to get remove the brackets and want to get like
33 runs
9 wickets
5 wickets
5 wickets
I used user defined function def extract(x): if x = str.extract('(\d\d)', expand = True) return x... This is not working.. any suggestions.. I am trying to learn regex ..
03:26
you can also split on ( if you have only one set of () in your string
@Sam that is awesome to hear! curious if you don't mind sharing, what was the actual question then?
@davesh but I have other values like 33 runs, which I dont want to change
also, cbg
@Jason not sure what you mean, splitting the string doesn't change the original string
In [95]: '9 wickets (with 29 balls remaining)'.split('(')[0]
Out[95]: '9 wickets '

In [96]: '33 runs'.split('(')[0]
Out[96]: '33 runs'
@Jason it is easier to tackle if you do it in two steps. there are two questions here. One is, "how do i match everything within brackets". second is, "how do i remove the stuff i matched". For the first, i recommend using a resource such as regex101.com . First, get the matching correct. Your current regex pattern fails to match what you need.
03:29
ok . thanks davesh, paritosh.. I will check and see
sure no problem
@ParitoshSingh still watching highlights, or did you watch the match yesterday :P
for the answer on how the regex may actually look, this can help. however, i encourage you to hover over the components and familiarize yourself with the regex syntax used here before using it.
cbg for 2 min
@DeveshKumarSingh ah, thanks for the reminder! i have yet to catch up
cbg
cbg
@ParitoshSingh haha missing out on the fun man, but guess that what happens when it's a work day, unless you leave early
03:33
I hate when people down-vote and comment saying what's wrong, when i edit, they forget to un-down-vote
hehe, or leave early but then realise you're too tired
sure, but I would rather sleep when the opponents are playing, or atleast after Sharma gets out
@U9-Forward hmm, but how are you sure if the commentor downvoted
@DeveshKumarSingh It has to be, almost everyone got doww-voted by him, and only he was commenting on the down-voted posts.
Oh yeah!! he finally undown-voted
nice, you just had to give him time
04:16
cabbage
Is your internet working faster @U9-Forward ?
05:11
cbg @DeveshKumarSingh
& @PM2Ring too
& everybody else
05:43
Bonjour, @ReblochonMasque
Bonjour.
The new popup is "Thanks for flagging, we'll take your reports seriously"...
Have accountants taken over stack overflow? O_o
IIRC, we got that popup when the Welcoming initiative started.
I assume everyone gets the same popup... maybe it should only happen after x number of successful flags. ;)
ok, I might have missed it earlier - I usually don't pay attention to browser noise.
06:11
cbg
cbg
@PM2Ring I always wonder about the origin of your username :) I guess the ring comes from the molecule model in your dp, perhaps an organic compound with a ring in it
Apr 16 '17 at 13:11, by PM 2Ring
@AshishNitinPatil PM is the complement to AM, and I greatly admire A M Turing
06:32
aah, from am turing, and PM because you stay awake at night?
07:12
cbg
cbg
07:24
Hi guys has anybody read the python data analysis book by Wes Mckinney?
07:55
@DeveshKumarSingh Something like that. ;) The shape in my avatar is a rhombic dodecahedron. It's just a shape I like, which I raytraced in POV-Ray. It's related to the cube & octahedron. I'll try to post an image that shows the relationship.
nice, does it have any interesting properties
one interesting property is that it is associated with the person behind PM 2Ring
@DeveshKumarSingh You can read about it on its Wikipedia page. It's a Catalan solid. It's useful as a 12 sided die, because it's not as round as a normal Platonic dodecahedron, so it stops rolling quicker.
@RaphX I reviewed the first edition, I can't imagine it hasn't been updated in seven years, but this is what I thoughtthen: holdenweb.blogspot.com/2012/11/python-for-data-analysis.html
Anyone here ever use pyinstaller with AnyQt and PyQt5? Got a head scratcher with a Windows customer (poor deluded soul).
08:15
Here's the logic behind that hexagonal diagram. The 14 vertices of the rhombic dodecahedron are the 8 vertices of the cube plus the 6 vertices of its dual, the octahedron.
Give the cube an ID of 1, then the other IDs, going clockwise, are 3, 2, 6, 4, 5, with 7 in the middle. So the ID of the octahedron is 2, and the rhombic dodecahedron is 4. Now convert those IDs to binary. The bits tell you which sets of edges are connected in that shape. So shape 5 has the edges of the cube and the edges of the rhombic dodecahedron.
7 years is a lot of time, do you still happen to have the book by any chance?@holdenweb
I hope that wasn't too confusing. :)
I had a doubt regarding one thing the author has done in the book
08:31
I have it somewhere, but maybe in storage, but i can access a current copy through Safari. What's the issue?
08:51
@PM2Ring Let me read up more on the wiki page
user10984358
09:25
in pyqt5 when I call a function using the btn.clicked.connect(functionToRun) how can I save the value it is returning?
@holdenweb i can say i had a vague brush with that mess.
@ParitoshSingh In which case you may not be able to help - we are finding that it doesn't integrate the PyQt code, which is therefore missing when we try to run the resultant program.
The qt.py hook was wrong in pyinstaller
and this was a fix
Thanks - we are indeed trying to build a Conda-based release, so this may help (though I think we've already moved to pip to install PyQt, we haven't yet thrown Anaconda away).
my solution involved actually skipping pyqt at the time, since i needed to just use pandas which for some reason pyinstaller thought required pyqt.
but that link was another approach, and it seemed promising at the time. i just never explored it myself
the issue is, pyinstaller needs "hooks" to figure out what to include, and the default hook for qt was* missing something
unless they have patched it since then
so, if your issue isn't appearing in normal python code, but only when packaging, this can help
09:45
@DeveshKumarSingh here's the most important property for me:
> This polyhedron in a space-filling tessellation can be seen as the Voronoi tessellation of the face-centered cubic lattice. It is the Brillouin zone of body centered cubic (bcc) crystals
09:57
getting a Monad deja-vu here
Well yeah, there's lots of jargon but almost all of the concepts in that sentence are very simple to understand. The only difficult one is the Brillouin zone, which is the Wigner--Seitz cell (easy) of the reciprocal lattice (difficult).
(the Wigner--Seitz cell is just a condensed matter physicist's way of saying Voronoi cell)
> (the Wigner--Seitz cell is just a condensed matter physicist's way of saying Voronoi cell)
That in itself is not helping (-:
Ah, well the Voronoi construction is much more well-known :) It's the division of n-dimensional space into m cells around m input points such that each cell contains all the points that are closest to a given input point among all the input points
And then you only need to know what 1. a crystal, 2. a face-centered cubic crystal, and 3. a body-centered cubic crystal are. And the reciprocal lattice which is the difficult part, which is a kind of dual of the (direct) crystal lattice... :D
For what it's worth I could explain the easy parts in 20 minutes with a blackboard.
reciprocal space would probably take an hour
if I want to talk about the physical motivation: 2 hours :D
10:18
reading all this takes me to my college days, a class where a professor throws around difficult words on the board, and everything goes wooosh over my head, but the sentences look so beautiful :)
Wikipedia has a diagram of the Voronoi cells of 20 random-ish points.
If you draw a line between two neighbouring points, that line is bisected by the border of those points' Voronoi cells.
That diagram is extremely useful
@AndrasDeak sounds like you need a Youtube channel
nah, this is textbook condensed matter physics
Good Noon Fellas
Sam
Sam
10:37
Wassaap
Do you guys why the print() function does not work when my script has a fast-repeating function?
@Sam google output buffering
Sam
Sam
i tried it with the while loop and a function loop
yeah i did flush it still doesnt work
def wsec_repeat():
    if(iconn()):
        wsec()
    wsec_repeat()
I don't see print nor flush
Sam
Sam
if i do this it doesnt do anything at all
no it is on a different location in the script
no but this doesnt print it and doesnt work. Just freezes.
if you do that you will get a recursion error sooner or later
Sam
Sam
10:39
when i do:
wait a min
@Sam delete that expletive please
along with your broken code
thanks
Sam
Sam
ok but why?
Why what?
You can practice in the sandbox
Sam
Sam
why delete
while iconn():
    print("Looped")
    sys.stdout.flush()
so that I don't have to trash it for you
Sam
Sam
10:41
Are you a mod?
no, just a room owner
For developing enterprise applications with Python-Django the business logic should be placed exactly where So consider the below case,

User login and User registration functionality,


User submits a template form which then directs it to a Views.py file(from urls.py) and then user login and user registration business logic is written in View. Over the course of time this views.py can grow big so where do I write the business logic so that it is free from these views.py file ?

One more thing tomorrow if I am exposing the User login and User registration via REST API, again I don't wanna
Sam
Sam
oh thats why you are always online
it might be the other way around, but sure
Sam
Sam
while iconn():
    print("Looped")
    sys.stdout.flush()
this doesnt flush
or am i supposed to flush before
10:43
Anyone ?
No, flushing only works after. And it's possible that it still won't flush, I'm not sure. Google output buffering in python, this has been discussed a lot on SO. I think you can start up python with buffering disabled.
Sam
Sam
sorry mate i dont know nothing of django
@GeekDroid if anyone can and is willing to help you, they will. Be patient.
@Sam Usually, that shouldn't need flushing. By default, print will put a newline when it finishes printing your data, and stdout is line buffered. Are you running this in a normal terminal?
Sam
Sam
git bash
i fixed it by doing this:
class Unbuffered(object):
   def __init__(self, stream):
       self.stream = stream
   def write(self, data):
       self.stream.write(data)
       self.stream.flush()
   def writelines(self, datas):
       self.stream.writelines(datas)
       self.stream.flush()
   def __getattr__(self, attr):
       return getattr(self.stream, attr)

sys.stdout = Unbuffered(sys.stdout)
10:48
that should be the same as manually flushing sys.stdout
oh well, as long as you're happy
Sam
Sam
yeah its a little bit ugly but works
i have another question
but thats sort of a batch question i think?
And print in a simple script works properly for you? You only get the problem when your script has that fast-repeating function?
Sam
Sam
anyway i blame it on python
yup only when fast repeating
but when i do os.system('PowerShell Start-Process "' + t + '" -WindowStyle Hidden') where t = echo 1 > folder/file.txt
it does not work
it does create the file but nothing is written to it
Sam
Sam
and ofcourse echo 1 > folder/file.txt in cmd does work
yes im very dumb
10:53
@Sam the conjecture "it is <established language x>'s fault" has a high probability of being wrong
Sam
Sam
no but tbh i trust batch more than python
and you should, windows is known to be a reliable OS
Sam
Sam
and try it for yourself, echo 1 > file.txt always works.
so why doesnt it work in python
because you are not doing the equivalent of echo 1 > file.txt
Sam
Sam
or do you guys think it has to do with the fact that i run it as a hidden powershell?
not the equivalent?
can you explain further?
10:55
not to mention that it is your shell that is running the command...
Sam
Sam
..........?
doing os.system('PowerShell launches the shell to run your command
Sam
Sam
yes thats true
i also found the error i think
i tried it in powershell first
C:\Users\super>PowerShell Start-Process "echo 1 > Desktop/poopie.txt" -WindowStyle Hidden
Start-Process : This command cannot be run due to the error: Het systeem kan het opgegeven bestand niet vinden.
At line:1 char:1
+ Start-Process echo 1 > Desktop/poopie.txt -WindowStyle Hidden
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Sam
Sam
oh yes the poopie.txt yes i use weird variables yes
and nothing can stop me.
10:58
> is not an argument to echo but to the shell
Sam
Sam
yes, thanks. I know a little bit of batch but never really got into powershell. Never figured windows would betray cmd like that, and use powershell for everything instead of cmd. I know powershell can do way more, but still, i think cmd is easier to handle.
C:\Users\super>PowerShell Start-Process "echo 1 ^> Desktop/poopie.txt" -WindowStyle Hidden
Start-Process : A positional parameter cannot be found that accepts argument '^>'.
they even changed the escape characters. smh.
"echo 1 ^> Desktop/poopie.txt" is not a program!
you cannot start it
I'm curious why you want to create a shell process in Python just to write a 1 to a file. Why not get Python to create the file directly?
the equivalent of > for Start-Process is -RedirectStandardOutput
Sam
Sam
the esccape char for powershell is ` right?
it does not work with that
11:05
see example 3
either way, why not just write directly?
with open('file.txt', 'w') as out_stream:
    out_stream.write('1')
Sam
Sam
because its a variable
it can be e.g. calc.exe
but i also want it to be a custom command
so it doesnt have to be always outputted
i will demonstrate further hang on
python request plaintext from server with instructions what to do
python executes request
example the server outputs echo 1 > thisfile.txt
but it can also output start "" calc.exe
so i want it to universally do a command
in a hidden shell otherwise it will be very ugly
subprocess.run(t, shell=True, check=True)
note that running arbitrary command strings is a bad idea
Sam
Sam
it is not random
okay it is random
I'm sure the server is trustworthy and all communication is properly encrypted and secured by a handshake /s
Sam
Sam
huh handshake no way lmao
yeah server is just http
no https because i dont have a domain name (yet)
isnt requests.post encrypted by default?
and according to my knowledge so far a server cant connect without a handshake, can it
11:13
If you can guarantee that the instruction from the server will never be anything malicious, then sure, feel free to execute it. But if you can't guarantee it, be very very careful.
Sam
Sam
it is not malicious it will just say friend random number is the winner of todays lottery
And you can guarantee that the instruction will come from your server and not someone else.
Sam
Sam
yeah the shell is not administrator
but still
i dont know i havent wrote a dns poisoning protection script befor
@Sam The handshake is normally invisible to the programmer, being performed by the TCP/IP stack on your behalf because you are opening a TCP socket.
Sam
Sam
yes
the instruction comes from a specific ip, as i havent got a domain name yet, so i guess it will always come from the server
11:15
@Sam requests.post will only encrypt if directed at an "https:..." URL and don't let anyone tell you otherwise.
Sam
Sam
unless some bad guy tries to do something funny with the dns servers
port 443 is open, but i dont have a ssl certificate
will it still be secure
here is a hint: if you have to ask "is this secure?", consider the answer to be "no"
Sam
Sam
everytime i visit the website chrome be saying watchout this is a unencrypted website and things
Which has happened. I think the first pulic DNS poisoning attack was performed against the CIA's web site-- back in 1995/6?
Sam
Sam
a global dns spoof attack?
i thought you would be only able to spoof dns on a specific network
11:17
You can also edit messages for 2 minutes. Use the feature.
It wasn't global, I believe, but once injected the false address was widely shared.
@Sam Ignorance is bliss.
Sam
Sam
false address?
doesnt dns spoofing redirect a domain name to just a different ip?
the domain name stays the same
hacking the DNS server so that "cia.gov" or whatever pointed to evil_IP rather than official_evil_IP
false address == false IP address
Sam
Sam
official_evil_ip?
@Sam the original IP the domain should've been pointing to
Sam
Sam
11:20
when i share google.com to you i share the domain not the ip
or did they hack 8.8.8.8
If you really want to know about DNS poisoning, where attacks have got much more sophisticate in the intervening 20 years, there's always this.
Sam
Sam
then still some people wont be affected
3 mins ago, by holdenweb
It wasn't global, I believe, but once injected the false address was widely shared.
what do you think "it wasn't global" means?
Sigh. ^^^^: "It wasn't global, I believe"
Sam
Sam
no but then only 1 town or something
11:21
That smell isn't garlic, is it?
Sam
Sam
how would they hack so much routers in the first place
@holdenweb very
Sam
Sam
sorry miscommunication
my english is limited
I wonder if it matters whether you use symmetric or asymmetric encryption between server and client. Is one of them easier to crack than the other?
Routers don't generally speaking offer DNS services. If you want to discuss the ins and outs of DNS poisoning you will need to find a more appropriate forum. This here's a Python list, so any knowledge gleaned about other areas is incidental.
Sam
Sam
11:24
encryption? talking about encryption, something that i could do is use a custom encryption on the server with a cypher or something and have the encrypted text transmitted and then translated again
Correction: That's something you should do.
@Sam What holdenweb said. Also the way you are asking about and responding to the off-topic subjects doesn't make me very happy.
Sam
Sam
Can you explain
@Aran-Fey Different algorithms have different strengths, but you can compensate for that by adjusting the key length. Compare the recommended key lengths for AES and RSA.
@Aran-Fey asymmetric encryption is mostly used for key exchange, because it's much slower than symmetric. So its primary purpose in today's Internet is to protect exchanges determining keys to be used for symmetric encryption, andto support digital signatures.
Sam
Sam
11:27
@AndrasDeak can you explain whats not making you happy
And can you explain how someone would do a dns spoof that is not local?
@Sam "A little learnng is a dangerous thing: drink deep, or touch not the Pierian spring." You appear to have a ways to go to build a comprehensive picture of how digital technologies fit together. Have you considered you may be trying to go too far too fast?
@Sam Your communication is exhausting, beyond any language barriers. You seem to be asking questions for which you don't have the necessary basics to be able to appreciate the answer. You need to go and do some learning of your own about the fundamentals of the things you're asking about.
I guess asymmetric encryption is the smart choice for this kind of thing... you can only use symmetric encryption if you're sure that nobody will ever get access to the client program (and with it, the key) after all
Sam
Sam
I did kali linux before, i just dont understand how someone could do multiple spoofs at once
@Aran-Fey That's the whole point of using (slow) asymmetric. You asymmetrically encrypt an exchange during which you (secretly, because it's encrypted) jointly negotiate a shared key. You then both use this shared key to symmetrically encrypt and decrypt the remaining traffic.
"Did kali linux" sounds like an American tourist who says they "did London in two days". Of course you don't understand - you don't yet have sufficient knowledge of the fundamentals. "There is no royal road to learning."
11:35
Modern machines can do AES in hardware, so it's very fast. en.wikipedia.org/wiki/AES_instruction_set
@holdenweb that does sound like "famous last words"
Sam
Sam
@holdenweb Can you please explain then how someone would do something like that because i really think it is not possible
12 mins ago, by holdenweb
Routers don't generally speaking offer DNS services. If you want to discuss the ins and outs of DNS poisoning you will need to find a more appropriate forum. This here's a Python list, so any knowledge gleaned about other areas is incidental.
@Sam let's stick to that please ^
Sam
Sam
ok
thank you
11:38
U&L has an excellent canonical for newbies asking Kali Linux questions: unix.stackexchange.com/questions/399626/…
Sam
Sam
"newbie"
thx
I didn't want to link that so we don't go into an aside about whether it applies to Sam or not
Sam
Sam
@PM2Ring as i said, kali is my main os, and yes i have installed it with everything
even if they are a top-notch blackbelt black hat hacker ninja rockstar this is not the right forum
@Sam "kali is my main os" sounds especially ridiculous, by the way
re-cabbage wonderful pythonistas
11:40
cbg
Sam
Sam
Kali is for a laptop a great os
yeah, every hacker uses a laptop. Easier to run away with
3
Sam
Sam
"main os" in the sentence - have dual boot
lol
Anyone cares to give me feedback on this answer I just posted? I don't know what I am doing with threading, and maybe I should delete it.
https://stackoverflow.com/questions/56866268/python-tkinter-buttons-are-not-working-during-a-while-loop-condition?noredirect=1#56866268
Sam
Sam
i think its good
11:42
@ReblochonMasque "constrong textditions"
haha
attention check
that's a literal quote from your answer
3rd paragraph
hahaha - thanks I corrected that!
Sam
Sam
11:45
what encryption do you guys suggest that i could replicate with php
RSA + AES CBC
Sam
Sam
+ as in encrypt an encryption?
Hey guys, need some help with regular expression
is it heresy to use a global variable in a thread?
Sam
Sam
or do you mean you suggest both
@JackDaniels go ahead
@ReblochonMasque i think so if you use a very unique variable name
11:48
@Sam Both. Read up on RSA and you'll understand.
@ReblochonMasque Not worse than using a global variable outside of a thread
test_string = 'Carrolton II 52 in. Integrated LED Indoor Brushed Nickel Ceiling Fan with Light Kit Rich Content Setup:Display Rich Content with Marketing Copy and Bullets;Large room 12 ft. x 12 ft.'

reg_pattern = r"\b[0-9]+\b(\-|\s|\))?(in|inch|ft|feet)([a-zA-Z0-9\.\-\s\(\)]+)?(light(s)?|bulb)"

When I'm doing re.search, it's working fine. Next task is to replace the pattern with another string. And re.sub is failing there.
okay, noted @Aran-Fey & @Sam, thanks
status was probably not a good name then
@JackDaniels MCVE for the working and the failing?
just to make sure we're all on the same page
@ReblochonMasque I didn't look at the whole thing, but I'd advise changing Thread(target=lambda: do_long_stuff(measured_values, thresholds)) to Thread(target=do_long_stuff, args=(measured_values, thresholds))
ok, will do @Aran-Fey, thanks
11:50
@AndrasDeak MCVE?
@AndrasDeak Oh, I posted that link about Kali for holdenweb. But Sam can read it if he wants to...
Sam
Sam
question about before, what does "That smell isn't garlic, is it?" mean
@Sam it means that you're looking a lot like a help vampire
Sam
Sam
11:57
ooh now i get it vampires hate garlic
it's their loss
test_string = 'Carrolton II 52 in. Integrated LED Indoor Brushed Nickel Ceiling Fan with Light Kit Rich Content Setup:Display Rich Content with Marketing Copy and Bullets;Large room 12 ft. x 12 ft.'
reg_pattern = r"\b[0-9]+\b(\-|\s|\))?(in|inch|ft|feet)([a-zA-Z0-9\.\-\s\(\)]+)?(light(s)?|bulb)"
pattern = re.search(reg_pattern, test_string, re.IGNORECASE).group()
# output will be '52 in. Integrated LED Indoor Brushed Nickel Ceiling Fan with Light'
# I need to replace this pattern with any randon string
@AndrasDeak this works?
@JackDaniels yes, that looks much better. Next time someone asks for an MCVE, start with that
12:07
Rule #1 of programming: If the function you're calling doesn't do what you expect, read its documentation.
7
Sam
Sam
who is joining me and the boys on minecraft
@AndrasDeak Sure. Thanks for heads up.
@Aran-Fey docs didn't help
Also one similar question was already downvoted, so asked here
@JackDaniels how about the Q&A Aran linked pinging you?
Try to assume that when you're given an answer it's for a reason. Try to see how the answer applies to your problem.
When you assume the answer doesn't help you you're making the same mistake as when you're assuming your code should work when it doesn't. Set aside your preconceptions and try to find the facts.
granted, that bug is fairly easy to miss even while you're staring at the docs
I missed that q&a, and yes, it solved my issue. Thanks guys.
12:27
@JackDaniels regex101.com is great for re experimentation
oh, and cbg
in this case it probably wouldn't have helped
@PaulMcG I'm using regex101, but this was a typical problem.
13:19
Can somebody please suggest a couple of good sources to study Data structure and Algorithms in python?
@holdenweb long time no see - how you doing?
@JonClements Indeed, how nice! Comme ci comme ca, thanks - not going to attempt cedilla on a Windows machine! And your good self?
Can't grumble... :)
Well... I could but... wouldn't be massively justified :p
13:35
Me too. Current contract ending this week, so if you get any leads they'd be much appreciated. Up to much professionally yourself?
Bits and bobs here and there - can't complain really... still trying to make my mind up on a few things regarding something firmer for work given health and other considerations, but, head's above water just about and such... so, definitely shouldn't complain... been quite fortunate in ways I guess
@holdenweb I'll keep an ear out for you... you still in the CTO kind of roles?
@JonClements I was thinking of doing the PSF thing - what sort of time commitment is it?
@JonClements Currently on "secondment" - doing short contracts where I can find them.
@RobertGrant there's probably 3/4 job postings a day... unless you need to leave some feedback on stuff... it's literally a few minutes to accept/reject stuff...
Cool, sounds good
13:50
@holdenweb okay... sounds familiar :) I take it you're doing a bit of hands-on coding stuff then? Any particular industry you're preferring at the mo'?
@RobertGrant Sweet, drop a hello to [email protected] if you want, and David/I will get back to you - we've got quite a few people interested, and I think we've got a slack channel now, and putting something together to introduce everyone to everyone in the near future...
Hi all, not sure if someone can have a look at this question, it's about how to use a condition and a multiindex at the same time to filter a dataframe stackoverflow.com/questions/56868784/…
user10984358
what should I be looking at if I want to know what checkboxes are selected in a group in PyQt5?
user10984358
I created the checkboxes inside a for loop
user10984358
I am trying something with QButtonGroup and buttonGroup.addButton(checkBox,idx), but I am not getting anywhere near progress city
14:03
@reydonsancho Hi. That question is still very new. We request that people don't ask for answers to their fresh questions in here. See the room rules for details. If you still don't have an answer in 2 days, feel free to ask about it then.
especially pandas questions :P
@TheNamesAlc And nataurally you stored them in a dictionary or a list or some such, correct?
@JonClements I've just spent four months creating an architecture and the first test programs for an electronics manufacturer's new products. Quite interesting, and if
@PM2Ring Thanks! Will do that
electronics were onvolved it wouldn't hurt, but not essential.
14:11
@holdenweb okie dokies...
14:30
Thanks. and yes, deffo hands-on! Been nice to get back to the code face.
@holdenweb don't know if you've seen the latest SO Blog - but that little musical ditty really made me laugh... amazingly clever :)
hello
outfile = open(file.file,'r+b')
print(type(outfile))
error
outfile = open(file.file,'r+b')
bfordocservice_1 | TypeError: expected str, bytes or os.PathLike object, not FieldFile
any idea why ?
No clue what a FieldFile is or what file is. Please post a ruprecht Minimal, Reproducible Example
14:45
from rest_framework.permissions import AllowAny
from rest_framework import views, status
from tools import views as toolsViews
from medical.serializers.patientfile import PatientFileDetailSrz
from medical.models.patientfile import PatientFile
import base64
import os

class PatientFileDetail(views.APIView):
  permission_classes = (AllowAny, )

  def post(self, request, *args, **kwargs):
      try:
          file = PatientFile.objects.get(pk=request.data['patientfile']['id'])
      except Exception:
^^ edit and press Ctrl-K to format as fixed font please
actually, we'd rather you limit your code posts to not so much, 8-10 lines max
That doesn't look very minimal, or reproducible.
If you do need more than a dozen or so lines, please use an external paste service, like dpaste or gist.
Would it be correct to assume that medical is a module you wrote and not some 3rd party stuff?
Check the type of file.file, open wants a str probably, and Im guessing FieldFile is some kind of class representing, um, a database field maybe? And so to get its string value, you need to access some kind of attribute like .value? or .text? <crystal ball getting cloudy>
@JonClements Amusing little number!
14:54
@holdenweb indeed... programming to disney themes... genius :)
Well being an old fart the fact that they are Disney themes went right over my head.
packet_size = int(1.5 * 1024**3) that's one hell of a packet
(Glaswegian accent) But I suppose that Disney matter.
@holdenweb lol... stuff from the littlest mermaid and the lion king were there :)
@MisterMiyagi holy cow that's big hahaha
14:57
@holdenweb we moved away from bug'rit now then ? :p
@MisterMiyagi Don't try sending them over a 14.4kb dialup modem.
user10984358
@holdenweb I thought of appending them to a list, but I thought that wouldn't be "standard" as I vaguely remember you can like group them and refer to them by id's and such in html, I was wondering if there is a way in which you can do so in PyQt, I will add them to a list and try to use the built in isChecked or some method available
03:00 - 15:0015:00 - 00:00

« first day (3182 days earlier)      last day (1991 days later) »