Re: Use epoll but still lose packet

2019-11-20 Thread lampahome
Dennis Lee Bieber 於 2019年11月21日 週四 上午2:17寫道: > On Wed, 20 Nov 2019 18:51:31 +0800, lampahome > declaimed the following: > > > > >I only use a while loop to catch events like below: > >import select, socket > >sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > >sock.bind() > > Doc

Re: Can we use Python for hacking?

2019-11-20 Thread user
On Tue, 12 Nov 2019 08:49:44 +0400, Abdur-Rahmaan Janhangeer wrote: > Greetings all, > > Someone requested my answer to the question: "Can we use Python for > hacking?" > > I compiled some interesting tools and uses here . > That's as far as i could see. If someone has more

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread MRAB
On 2019-11-20 21:58, Terry Reedy wrote: On 11/20/2019 11:09 AM, Göktuğ Kayaalp wrote: The first problem is installation: apart from me, a Debian user, everybody has Windows or Mac laptops, and IDK how you install Python on them. The simplest thing is to use the 3.8.0 python.org installers. T

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Abdur-Rahmaan Janhangeer
Besides the mistakes in the pdf (random.shuffle) the idea is to get the right environment then py basics then numpy+pandas then viz seaborn or minimal matplotlib Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius On Thu, 21 Nov 2019, 00:49 Abdur-R

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Terry Reedy
On 11/20/2019 11:09 AM, Göktuğ Kayaalp wrote: The first problem is installation: apart from me, a Debian user, everybody has Windows or Mac laptops, and IDK how you install Python on them. The simplest thing is to use the 3.8.0 python.org installers. This use pip to add anything you consider

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
On 2019-11-20 16:03 -05, Andrew Z wrote: > Look into https://repl.it Sadly this apparaently can’t do plots. > On Wed, Nov 20, 2019, 15:43 Göktuğ Kayaalp wrote: > >> >> Andrew Z wrote: >> > Goktug, >> > Im not clear what is the objective of the lecture? I understand it is >> an >> > intro, b

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
On 2019-11-20 13:29 -07, Akkana Peck wrote: > Chris Angelico writes: >> On Thu, Nov 21, 2019 at 4:42 AM Nick Sarbicki >> wrote: >> > RE Conda and distros - I'd forget about them, in my experience you may as >> > well learn to use pip and install what you need that way, in the long term >> >> Ag

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
Chris Angelico wrote: >On Thu, Nov 21, 2019 at 4:42 AM Nick Sarbicki >wrote: >> RE Conda and distros - I'd forget about them, in my experience you may as >> well learn to use pip and install what you need that way, in the long term >> it is faster and more flexible. Python generally supplies a p

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Look into https://repl.it On Wed, Nov 20, 2019, 15:43 Göktuğ Kayaalp wrote: > > Andrew Z wrote: > > Goktug, > > Im not clear what is the objective of the lecture? I understand it is > an > > intro, but what are you trying to achieve? > > Basically I need to introduce my non-programmer frien

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
Nick Sarbicki wrote: > Hi Goktug, > > Firstly good luck, inspiring a crowd of people who have never learnt to > code (and probably never expected to) to want to code sounds like a > daunting task. > > I think you have broadly the right idea in that you want to spend only a > little bit of time on

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Chris Angelico
On Thu, Nov 21, 2019 at 7:44 AM Göktuğ Kayaalp wrote: > > > Andrew Z wrote: > > Goktug, > > Im not clear what is the objective of the lecture? I understand it is an > > intro, but what are you trying to achieve? > > Basically I need to introduce my non-programmer friends to Python and > show t

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Abdur-Rahmaan Janhangeer
I have a draft of a concise py book for data people which i am preparing, might be useful to you. https://drive.google.com/file/d/1IKLBuJJWQKvcTWu-REsgm-JUGSvytBUu/view?usp=drivesdk Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius On Wed, 20 No

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
Andrew Z wrote: > Goktug, > Im not clear what is the objective of the lecture? I understand it is an > intro, but what are you trying to achieve? Basically I need to introduce my non-programmer friends to Python and show them that they can easily learn to do their statistics with it, produce

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Akkana Peck
Chris Angelico writes: > On Thu, Nov 21, 2019 at 4:42 AM Nick Sarbicki > wrote: > > RE Conda and distros - I'd forget about them, in my experience you may as > > well learn to use pip and install what you need that way, in the long term > > Agreed. More agreement. Someone at the local makerspa

Re: Use epoll but still lose packet

2019-11-20 Thread Marko Rauhamaa
Dennis Lee Bieber : > (though as I don't really understand the use of this function, that > may just mean that all the events will be in the one return structure, > and not that there is only one event). I use epoll almost every day. You've done a good job explaining it. > Given that your c

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Chris Angelico
On Thu, Nov 21, 2019 at 4:42 AM Nick Sarbicki wrote: > RE Conda and distros - I'd forget about them, in my experience you may as > well learn to use pip and install what you need that way, in the long term > it is faster and more flexible. Python generally supplies a perfectly good > installer for

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Nick Sarbicki
Hi Goktug, Firstly good luck, inspiring a crowd of people who have never learnt to code (and probably never expected to) to want to code sounds like a daunting task. I think you have broadly the right idea in that you want to spend only a little bit of time on the basic syntax before demoing what

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Goktug, Im not clear what is the objective of the lecture? I understand it is an intro, but what are you trying to achieve? I didnt read all the details, but maybe you can look into creating a docker/virtual box image with everything preinstalled. Good luck. On Wed, Nov 20, 2019, 11:54 Göktuğ K

Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
Hi all, I am responsible of giving my colleagues in from linguistics MA programme an intro to Python, and programming, with a focus on statistics. It’ll be a single lecture, and I probably won’t be able to do more than give some demos and then some pointers to actually properly learn how to use t

Re: Any socket library to communicate with kernel via netlink?

2019-11-20 Thread Ian Pilcher
On 11/18/19 9:23 PM, lampahome wrote: As title, I tried to communicate with kernel via netlink. But I failed when I receive msg from kernel. The weird point is sending successfully from user to kernel, failed when receiving from kernel. So I want to check code in 3rd library and dig in, but alw

Use epoll but still lose packet

2019-11-20 Thread lampahome
I use epoll to listen events to receive packet from remote client via tcp socket And I found it still lose packet from remote client when client sends 128 messages to me. Is there any tips to avoid this? thx I only use a while loop to catch events like below: import select, socket sock = socket.

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Dennis, > So... extract the original args, then build a new args object with your > added argument, then call your new function with that... I wanted to respond that prepending a string to an existing argument sounds quite a bit easier than what you are describing, but than I realized that I ju

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Michael, > If you mentioned RPi.GPIO before, I apologize for my mistake. No I didn't, there is nothing to apologize for. > That's very helpful to know. I have no clue to why it would be, as my question has got *zero* to do with it - its valid for /any/ extension using the CPython C API.Jus

Re: Pickle failed __getstate__ on my customized class inherited dict

2019-11-20 Thread Peter Otten
lampahome wrote: > I make a class Wrapper inherited from dict and met problem when I want to > pickle it. > > Is there anyway to make __getstate__ of Wrapper to output a normal > dict?(Output a dict will help pickleing easily) > > > === code === > import pickle > class Wrapper(dict): > def

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Luciano, > Now that's a novel approach to asking for free help: pretending > to be smarter than the people who are trying to help you. What makes you think I'm /pretending/ ?*Ofcourse* I'm smarter than anyone on this earth, didn't you know ? :-D But I'll let you in on a secret: I'm rather a