Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 9:05 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: Στις 9/11/2013 8:37 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 5:32 PM, Νίκος Αλεξόπουλος wrote: I'am not saying out of arrogance but i was really under the impression i had secure my script. And i had until i made some new chan

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 9:19 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 6:11 PM, Νίκος Αλεξόπουλος wrote: These 4 are yours for sure: mail14.ess.barracuda.com mail0.ess.barracuda.com 209.133.77.167.T01713-01.above.net 209.133.77.164.T01713-01.above.net This one '89-145-108-205.as29017.net'

Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ???

2013-11-08 Thread dieter
richard.bal...@gmail.com writes: > I have the following script that reads in an HTML file containing a table > then sends it out via email with a content type of text/html. > > For some reason a few erroneous whitespaces get introduced to the HTML source > and a few < > chars get converted to <

Re: To whoever hacked into my Database

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 6:11 PM, Νίκος Αλεξόπουλος wrote: > These 4 are yours for sure: > > mail14.ess.barracuda.com > mail0.ess.barracuda.com > 209.133.77.167.T01713-01.above.net > 209.133.77.164.T01713-01.above.net > > This one '89-145-108-205.as29017.net' is not because this originate from > Eur

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 8:45 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 5:35 PM, Νίκος Αλεξόπουλος wrote: I believe these hostnames belong to you: mail14.ess.barracuda.com mail0.ess.barracuda.com 89-145-108-205.as29017.net 209.133.77.167.T01713-01.above.net 209.133.77.164.T01713-01.above.net

Re: my favorite line of py code so far

2013-11-08 Thread Peter Otten
Peter Cacioppi wrote: > my fav so far is this > > _ = lambda c : lambda x : c(*x) > > c can be any calleable and x any iterable, but I tend to use it with a > class, and then map _(class) over the result of a zip. > > It must be in the library somewhere, but I haven't found it. I'm never > sure

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 8:37 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 5:32 PM, Νίκος Αλεξόπουλος wrote: I'am not saying out of arrogance but i was really under the impression i had secure my script. And i had until i made some new changes last night, which i think i have corrected now as w

Re: To whoever hacked into my Database

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 5:35 PM, Νίκος Αλεξόπουλος wrote: > I believe these hostnames belong to you: > > mail14.ess.barracuda.com > mail0.ess.barracuda.com > 89-145-108-205.as29017.net > 209.133.77.167.T01713-01.above.net > 209.133.77.164.T01713-01.above.net > > Correct me if i'm wrong. You're wro

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 8:20 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 4:54 PM, Νίκος Αλεξόπουλος wrote: Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He is done it twice, lets see if he will make it again! I'am waiting! I

Re: To whoever hacked into my Database

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 5:32 PM, Νίκος Αλεξόπουλος wrote: > I'am not saying out of arrogance but i was really under the impression i had > secure my script. > > And i had until i made some new changes last night, which i think i have > corrected now as we speak. In other words, you closed off what

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 8:20 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 4:54 PM, Νίκος Αλεξόπουλος wrote: Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He is done it twice, lets see if he will make it again! I'am waiting! I

Re: To whoever hacked into my Database

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 4:54 PM, Νίκος Αλεξόπουλος wrote: > Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: >> >> Okey let the hacker try again to mess with my database!!! >> >> He is done it twice, lets see if he will make it again! >> >> I'am waiting! > > > > I have to congratulate the hacher be

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 7:54 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He is done it twice, lets see if he will make it again! I'am waiting! I have to congratulate the hacher because as it seems s/he's

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He is done it twice, lets see if he will make it again! I'am waiting! I have to congratulate the hacher because as it seems s/he's done it again. S/he's manages to actually pass fake f

Re: Adding 'download' column to existing 'visitors' table (as requested)

2013-11-08 Thread Piet van Oostrum
Sibylle Koczian writes: > Am 07.11.2013 14:14, schrieb Piet van Oostrum: >> Nick the Gr33k writes: >> >>> I have decided to take your advice. >>> I wasn't able to fit those 'lists' of mine into MySQL's varchar() >>> datatype after converting them to long strings and that sads me. >>> >>> My impl

Re: To whoever hacked into my Database

2013-11-08 Thread rusi
On Saturday, November 9, 2013 8:45:17 AM UTC+5:30, rusi wrote: > I recollect Denis saying with a great deal of IRRITATION that he had > installed something (dont remember exactly what) and tried it out on > his machine JUST TO HELP NIKOS. By which I meant to say also that Nikos is not just gettin

REG: Interactive Python (ipython notebook) Tutorial for Beginners

2013-11-08 Thread Anoop Thomas Mathew
Hi All, Lately, I've been working on a ipython notebook tutorial for beginners. The idea is that, those who have basic idea about computers should be able to pick up python very easily. https://bitbucket.org/atmb4u/python-live/ I have completed 25 chapters. Would love some reviews, suggestions a

Re: To whoever hacked into my Database

2013-11-08 Thread rusi
On Friday, November 8, 2013 11:38:37 PM UTC+5:30, Chris Angelico wrote: > On Sat, Nov 9, 2013 at 4:11 AM, rurpy wrote: > > On 11/08/2013 03:05 AM, Νίκος Αλεξόπουλος wrote: > >> I never ignore advices. > >> I read all answers as carefully as i can. > >> But nevertheless sometimes i feel things shou

Conditional breakpoints in ceval.c

2013-11-08 Thread Demian Brecht
Hi all, I have an .py file with a simple assignment in it: foo = 'bar' Now, I want to set a conditional breakpoint in gdb, breaking on that assignment (I'm guessing the top of the stack would be breaking on the LOAD_CONST with a value or 'bar'). How would I go about doing that? b ceval.c:1368 if

Re: chunking a long string?

2013-11-08 Thread Steven D'Aprano
On Fri, 08 Nov 2013 12:48:12 -0500, Roy Smith wrote: > I have a long string (several Mbytes). I want to iterate over it in > manageable chunks (say, 1 kbyte each). For (a small) example, if I > started with "this is a very long string", and I wanted 10 character > chunks, I should get: > > "thi

Re: chunking a long string?

2013-11-08 Thread Steven D'Aprano
On Fri, 08 Nov 2013 12:43:43 -0800, wxjmfauth wrote: > "(say, 1 kbyte each)": one "kilo" of characters or bytes? > > Glad to read some users are still living in an ascii world, at the > "Unicode time" where an encoded code point size may vary between 1-4 > bytes. > > > Oops, sorry, I'm wrong,

Relational data model, relations, and relationships (was: To whoever hacked into my Database)

2013-11-08 Thread Ben Finney
Dennis Lee Bieber writes: > On Fri, 08 Nov 2013 13:31:02 +, Mark Lawrence > declaimed the following: > > >The only relational database that has no relationships as effectively > >there's only one table, despite what Denis McMahon (amongst others?) > >has said. Relational databases aren't ab

Re: To whoever hacked into my Database

2013-11-08 Thread Mark Lawrence
On 09/11/2013 00:06, Dennis Lee Bieber wrote: On Fri, 08 Nov 2013 13:31:02 +, Mark Lawrence declaimed the following: On 08/11/2013 10:05, ? ??? wrote: I never ignore advices. I read all answers as carefully as i can. But nevertheless sometimes i feel things should have been b

Re: datetime question

2013-11-08 Thread Mark Lawrence
On 08/11/2013 23:02, Νίκος Αλεξόπουλος wrote: Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have to rewrite all your code in perl to do this. P

Re: datetime question

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 10:02 AM, Νίκος Αλεξόπουλος wrote: > Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: > >> On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: >> >>> I saw the link and i'm wondering if it can be written in 1-liner. >> >> >> Yes, but you have to rewrite all your c

Re: datetime question

2013-11-08 Thread Robert Kern
On 2013-11-08 23:02, Νίκος Αλεξόπουλος wrote: Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have to rewrite all your code in perl to do this. P

Re: datetime question

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have to rewrite all your code in perl to do this. Please tell me and as a git i will provide you w

Re: Count each unique element in list of lists

2013-11-08 Thread Vlastimil Brom
2013/11/8 Yaşar Arabacı : > Hi, > > I have a function that returns something like this; > > [[[1, 5, 9], [2, 6, 7], [3, 4, 8]], [[1, 6, 8], [2, 4, 9], [3, 5, 7]]] > > It is a list of list of lists. Each uppermost list is called a result. > I want to write a code that > shows that each elem in subli

Re: datetime question

2013-11-08 Thread Denis McMahon
On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: > I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have to rewrite all your code in perl to do this. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: my favorite line of py code so far

2013-11-08 Thread Peter Cacioppi
Chris said: "So... for any given class, it returns a tweaked version that unpacks an iterable of its arguments instead of taking separate args. " It works with any calleable (not just any class), but otherwise your summary is spot on. "Interesting, perhaps, but not something that'll be needed

Re: my favorite line of py code so far

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 9:22 AM, Peter Cacioppi wrote: > my fav so far is this > > _ = lambda c : lambda x : c(*x) > > c can be any calleable and x any iterable, but I tend to use it with a class, > and then map _(class) over the result of a zip. > > It must be in the library somewhere, but I have

Re: datetime question

2013-11-08 Thread Grant Edwards
On 2013-11-08, ?? ?? wrote: >>> Is there someway to [...] >> http://stackoverflow.com/[...] > I saw the link and i'm wondering if it can be written in 1-liner. > Don't get me wrong but i had the lastvisit calculated on 1 statement > and i want to retain it this way.

my favorite line of py code so far

2013-11-08 Thread Peter Cacioppi
my fav so far is this _ = lambda c : lambda x : c(*x) c can be any calleable and x any iterable, but I tend to use it with a class, and then map _(class) over the result of a zip. It must be in the library somewhere, but I haven't found it. I'm never sure what to call it, so I just reroll it i

Re: datetime question

2013-11-08 Thread Mark Lawrence
On 08/11/2013 22:01, Νίκος Αλεξόπουλος wrote: Στις 8/11/2013 11:29 μμ, ο/η Mark Lawrence έγραψε: On 08/11/2013 21:11, Νίκος Αλεξόπουλος wrote: Is there someway to write the following line even better with the ability to detect daylight saving time by itself so i don't have to alter the line man

Re: [DB-SIG] dbf files and compact indices

2013-11-08 Thread Paul Hemans
If you can read c code, have a look at the Harbour (clipper) open source project. It works with CDX files. -- https://mail.python.org/mailman/listinfo/python-list

When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ???

2013-11-08 Thread richard . balbat
I have the following script that reads in an HTML file containing a table then sends it out via email with a content type of text/html. For some reason a few erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ??? # Import libraries import smtpl

Re: datetime question

2013-11-08 Thread Joel Goldstick
rurpy? can you help? On Fri, Nov 8, 2013 at 5:01 PM, Νίκος Αλεξόπουλος wrote: > Στις 8/11/2013 11:29 μμ, ο/η Mark Lawrence έγραψε: >> >> On 08/11/2013 21:11, Νίκος Αλεξόπουλος wrote: >>> >>> Is there someway to write the following line even better with the >>> ability to detect daylight saving t

Re: datetime question

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 11:29 μμ, ο/η Mark Lawrence έγραψε: On 08/11/2013 21:11, Νίκος Αλεξόπουλος wrote: Is there someway to write the following line even better with the ability to detect daylight saving time by itself so i don't have to alter the line manually when time changes? lastvisit = ( datetim

Re: datetime question

2013-11-08 Thread Mark Lawrence
On 08/11/2013 21:11, Νίκος Αλεξόπουλος wrote: Is there someway to write the following line even better with the ability to detect daylight saving time by itself so i don't have to alter the line manually when time changes? lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( '%y-%m-%

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 8:14 AM, Grant Edwards wrote: >> or are your connections blocking for lack of entropy? > > Nope. The cyrpto libraries we're using don't do that. I'm not > entirely happy with the entropy generation used. I wish I had more > sources of "real" randomness, but at least they d

Re: chunking a long string?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 8:06 AM, Mark Lawrence wrote: > Those figures look really good but I actually want figures that do things my > way, even if the figures aren't as good or even suck completely. Can you > help me with this even if I've already asked 42 times before but have always > been give

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Chris Angelico wrote: > On Sat, Nov 9, 2013 at 7:48 AM, Grant Edwards wrote: >> All I have control over is the server. I have no influence over the >> client side of things other than what I can do in the HTTP server. > > Hmm. Then the only way I can think of is a reverse proxy tha

datetime question

2013-11-08 Thread Νίκος Αλεξόπουλος
Is there someway to write the following line even better with the ability to detect daylight saving time by itself so i don't have to alter the line manually when time changes? lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( '%y-%m-%d %H:%M:%S' )# MySQL datetime format

Re: chunking a long string?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 8:04 AM, Tim Chase wrote: > On 2013-11-09 07:53, Chris Angelico wrote: >> On the flip side, Python gets really awesome at some other things. >> Your operating system probably takes an entire CD to distribute, >> maybe even a DVD, so that's either 700MB or 4.7GB, give or take

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Ian Kelly wrote: > Do you really need to send all the page resources over HTTPS? Probably not, but it's not my decision. The customer/client makes that decision. > Perhaps you could reduce some of the SSL overhead by sending images > and stylesheets over a plain HTTP connection

Re: chunking a long string?

2013-11-08 Thread Mark Lawrence
On 08/11/2013 20:53, Chris Angelico wrote: On Sat, Nov 9, 2013 at 7:43 AM, wrote: Oops, sorry, I'm wrong, it can be much more. sys.getsizeof('ab') 27 sys.getsizeof('a\U0001d11e') 48 I know, overhead sucks doesn't it. Python is really abysmal at that; look how big a single bit is: sy

Re: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Nick Cash wrote: >>What I really need is an HTTP header or meta-tag or something that I >>can use to tell clients to limit themselves to a single connection. > > I don't think such a thing exists... Yea, that's pretty much the conclusion I had reached. > but you may be able to so

Re: chunking a long string?

2013-11-08 Thread Tim Chase
On 2013-11-09 07:53, Chris Angelico wrote: > On the flip side, Python gets really awesome at some other things. > Your operating system probably takes an entire CD to distribute, > maybe even a DVD, so that's either 700MB or 4.7GB, give or take. > Look how efficiently Python can represent it: > >

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 7:48 AM, Grant Edwards wrote: > All I have control over is the server. I have no influence over the > client side of things other than what I can do in the HTTP server. Hmm. Then the only way I can think of is a reverse proxy that can queue, handle security, or whatever els

Re: chunking a long string?

2013-11-08 Thread Mark Lawrence
On 08/11/2013 20:43, wxjmfa...@gmail.com wrote: "(say, 1 kbyte each)": one "kilo" of characters or bytes? Glad to read some users are still living in an ascii world, at the "Unicode time" where an encoded code point size may vary between 1-4 bytes. Oops, sorry, I'm wrong, it can be much more.

Re: chunking a long string?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 7:43 AM, wrote: > Oops, sorry, I'm wrong, it can be much more. > sys.getsizeof('ab') > 27 sys.getsizeof('a\U0001d11e') > 48 I know, overhead sucks doesn't it. Python is really abysmal at that; look how big a single bit is: >>> sys.getsizeof(1) 14 >>> sys.ge

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Chris Angelico wrote: > On Sat, Nov 9, 2013 at 6:20 AM, Grant Edwards wrote: >> On 2013-11-08, Chris Angelico wrote: >>> Are you using HTTP 1.1 with connection reuse? >> >> Yes. And several years ago when I first enabled that feature in the >> server, I verified that some browser

Re: chunking a long string?

2013-11-08 Thread wxjmfauth
"(say, 1 kbyte each)": one "kilo" of characters or bytes? Glad to read some users are still living in an ascii world, at the "Unicode time" where an encoded code point size may vary between 1-4 bytes. Oops, sorry, I'm wrong, it can be much more. >>> sys.getsizeof('ab') 27 >>> sys.getsizeof('a\

Re: Programa no modo gráfico

2013-11-08 Thread Izar Tarandach
You can find many resources for GUI programming in Python here: https://wiki.python.org/moin/GuiProgramming I believe you'll have better results with this list if you post your queries in English. --izar 2013/11/8 Guitar Men > Como faço para fazer um programa no modo gráfico sem usar o prom

Re: Programa no modo gráfico

2013-11-08 Thread Chris Angelico
2013/11/9 Guitar Men : > Como faço para fazer um programa no modo gráfico sem usar o prompt? My apologies, I don't speak Portuguese. Hopefully you can use an automated translation tool to understand this. On Windows, you can run a program with pythonw.exe rather than python.exe to hide the conso

Re: To whoever hacked into my Database

2013-11-08 Thread Neil Cerutti
On 2013-11-08, ru...@yahoo.com wrote: > Just wanted to let you know that not everybody here is an > asshole. It is just that assholes, by their nature, are the > loudest. Hey man, pass that over! -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-08 Thread Antoon Pardon
Op 08-11-13 18:26, Ned Deily schreef: > Please! Everyone! Take this discussion elsewhere. It is way off-topic and > the negative energy is damaging this forum for everyone else. > > "The Python Software Foundation and the global Python community welcome and > encourage participation by everyo

Twisted 13.2.0 Release Announcement

2013-11-08 Thread HawkOwl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of Twisted Matrix Laboratories, I am honoured to announce the release of Twisted 13.2! The highlights of this release are: * Twisted now includes a HostnameEndpoint implementation which uses IPv4 and IPv6 in parallel, speeding up the conne

Programa no modo gráfico

2013-11-08 Thread Guitar Men
Como faço para fazer um programa no modo gráfico sem usar o prompt? -- https://mail.python.org/mailman/listinfo/python-list

Code with random module faster on the vm than the vm host...

2013-11-08 Thread Pascal Bit
Here's the code: from random import random from time import clock s = clock() for i in (1, 2, 3, 6, 8): M = 0 N = 10**i for n in xrange(N): r = random() if 0.5 < r < 0.6: M += 1 k = (N, float(M)/N) print (clock()-s) Running on win7 python 2.7 32 b

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Ian Kelly
On Fri, Nov 8, 2013 at 10:25 AM, Grant Edwards wrote: > Yes, this off-topic, but after a fair amount of Googling and searching > in the "right" places, I'm running out of ideas. > > I've got a very feeble web server. The crypto handshaking involved in > opening an https: connection takes 2-3 seco

RE: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Nick Cash
>What I really need is an HTTP header or meta-tag or something that I can use >to tell clients to limit themselves to a single connection. I don't think such a thing exists... but you may be able to solve this creatively: A) Set up a proxy server that multiplexes all of the connections into a s

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 6:20 AM, Grant Edwards wrote: > On 2013-11-08, Chris Angelico wrote: >> Are you using HTTP 1.1 with connection reuse? > > Yes. And several years ago when I first enabled that feature in the > server, I verified that some browsers were sending multiple requests > per connec

Re: Count each unique element in list of lists

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 6:28 AM, Yaşar Arabacı wrote: > I want to write a code that > shows that each elem in sublists of result on appears once in whole > sublist in order to add it to > my doctest. So, to clarify the problem: You want to ensure that every element occurs exactly once, neither mor

Re: Count each unique element in list of lists

2013-11-08 Thread yasar11732
This works; >>> for result in results: flat = list(item for group in result for item in group) print [sum([1 for el in flat if el==current]) for current in flat] [1, 1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1, 1] But I am still open to suggestions if anyone thinks t

Automate Google Drive SDK Authorization

2013-11-08 Thread Pratik Mehta
Guys, I am stuck with a problem. #!/usr/bin/python import httplib2 import pprint from apiclient.discovery import build from apiclient.http import MediaFileUpload from oauth2client.client import OAuth2WebServerFlow # Copy your credentials from the co

Count each unique element in list of lists

2013-11-08 Thread Yaşar Arabacı
Hi, I have a function that returns something like this; [[[1, 5, 9], [2, 6, 7], [3, 4, 8]], [[1, 6, 8], [2, 4, 9], [3, 5, 7]]] It is a list of list of lists. Each uppermost list is called a result. I want to write a code that shows that each elem in sublists of result on appears once in whole su

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 7:11 μμ, ο/η ru...@yahoo.com έγραψε: On 11/08/2013 03:05 AM, Νίκος Αλεξόπουλος wrote: I never ignore advices. I read all answers as carefully as i can. But nevertheless sometimes i feel things should have been better implemented using my way. Not of course that i know better, but

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Chris Angelico wrote: > On Sat, Nov 9, 2013 at 4:25 AM, Grant Edwards wrote: >> I've got a very feeble web server. The crypto handshaking involved in >> opening an https: connection takes 2-3 seconds. That would be fine if >> a browser opened a single connection and then sent a s

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 8:19 μμ, ο/η Denis McMahon έγραψε: On Fri, 08 Nov 2013 01:28:19 +0200, Νίκος Αλεξόπουλος wrote: If i was completely incompetent i wouldn't had a working website and i wasn't able to design my customers' webpages. If your website is working, why do you keep posting here asking u

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-08 Thread Ian Kelly
On Fri, Nov 8, 2013 at 8:48 AM, wrote: > 3^2-2^2=5 How do you intend to encode 3**2 - 2**2 in such a way that it is more compact than simply encoding 5? If you actually have an algorithm, you should share it instead of dropping these cryptic one-line non-explanations and leaving us guessing abo

Re: To whoever hacked into my Database

2013-11-08 Thread Denis McMahon
On Fri, 08 Nov 2013 01:10:37 +, Steve Simmons wrote: > I must say that I kinda like the idea of Nick's computer gagging on his > code and sending him messages pleading that he educated himself. It's a more likely scenario that Nick learning to code properly. -- Denis McMahon, denismfmcma...

Re: chunking a long string?

2013-11-08 Thread Roy Smith
Oh my, it turns out I don't really need to do this after all, due to previously undiscovered uber-coolness in the tools I'm using! My use case is that from inside of a Django view, I needed to retrieve a large file via a HTTP GET, and serve that back up, with some time delays inserted into the

Re: chunking a long string?

2013-11-08 Thread Zero Piraeus
: On Fri, Nov 08, 2013 at 12:48:12PM -0500, Roy Smith wrote: > I have a long string (several Mbytes). I want to iterate over it in > manageable chunks (say, 1 kbyte each). > > "this is a " > "very long " > "string" > > This seems like something itertools would do, but I don't see anything. You

Re: To whoever hacked into my Database

2013-11-08 Thread Denis McMahon
On Fri, 08 Nov 2013 01:28:19 +0200, Νίκος Αλεξόπουλος wrote: > If i was completely incompetent i wouldn't had a working website and i > wasn't able to design my customers' webpages. If your website is working, why do you keep posting here asking us how to fix it? -- Denis McMahon, denismfmcma.

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 4:25 AM, Grant Edwards wrote: > I've got a very feeble web server. The crypto handshaking involved in > opening an https: connection takes 2-3 seconds. That would be fine if > a browser opened a single connection and then sent a series of > requests on that connection to l

Re: To whoever hacked into my Database

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 4:11 AM, wrote: > On 11/08/2013 03:05 AM, Νίκος Αλεξόπουλος wrote: >> I never ignore advices. >> I read all answers as carefully as i can. >> But nevertheless sometimes i feel things should have been better >> implemented using my way. >> >> Not of course that i know better

RE: chunking a long string?

2013-11-08 Thread Nick Cash
> I have a long string (several Mbytes). I want to iterate over it in > manageable chunks This is a weirdly common question. See http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python for several solutions. It's been proposed to be added to iterto

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
On 2013-11-08, Skip Montanaro wrote: >> What I really need is an HTTP header or meta-tag or something that I >> can use to tell clients to limit themselves to a single connection. >> >> I haven't been able to find such a thing, but I'm hoping I've >> overlooked something... > > That will only go s

Re: chunking a long string?

2013-11-08 Thread Skip Montanaro
> I have a long string (several Mbytes). I want to iterate over it in > manageable chunks (say, 1 kbyte each). You don't mention if the string is in memory or on disk. If it's in memory: >>> for i in range(0, len(s), 10): ... print repr(s[i:i+10]) ... 'this is a ' 'very long ' 'string' If yo

Re: chunking a long string?

2013-11-08 Thread Peter Otten
Roy Smith wrote: > I have a long string (several Mbytes). I want to iterate over it in > manageable chunks (say, 1 kbyte each). For (a small) example, if I > started with "this is a very long string", and I wanted 10 character > chunks, I should get: > > "this is a " > "very long " > "string" >

Re: chunking a long string?

2013-11-08 Thread Mark Lawrence
On 08/11/2013 17:48, Roy Smith wrote: I have a long string (several Mbytes). I want to iterate over it in manageable chunks (say, 1 kbyte each). For (a small) example, if I started with "this is a very long string", and I wanted 10 character chunks, I should get: "this is a" "very long" "str

Re: pywin32 programming error on Win7 with shell.SHGetDesktopFolder, desktop.BindToObject, desktop.GetDisplayNameOf

2013-11-08 Thread MRAB
On 08/11/2013 03:30, iMath wrote: When running the following code on WinXP , all is fine , -- from win32com.shell import shell def launch_file_explorer(path, files): folder_pidl = shell.SHILCreateFromPath(path,0)[0] desktop

chunking a long string?

2013-11-08 Thread Roy Smith
I have a long string (several Mbytes). I want to iterate over it in manageable chunks (say, 1 kbyte each). For (a small) example, if I started with "this is a very long string", and I wanted 10 character chunks, I should get: "this is a " "very long " "string" This seems like something iterto

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Skip Montanaro
> What I really need is an HTTP header or meta-tag or something that I > can use to tell clients to limit themselves to a single connection. > > I haven't been able to find such a thing, but I'm hoping I've > overlooked something... That will only go so far. Suppose you tell web browsers "no more

Re: OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread donarb
On Friday, November 8, 2013 9:25:30 AM UTC-8, Grant Edwards wrote: > Yes, this off-topic, but after a fair amount of Googling and searching > in the "right" places, I'm running out of ideas. > > I've got a very feeble web server. The crypto handshaking involved in > opening an https: connection t

OT: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Grant Edwards
Yes, this off-topic, but after a fair amount of Googling and searching in the "right" places, I'm running out of ideas. I've got a very feeble web server. The crypto handshaking involved in opening an https: connection takes 2-3 seconds. That would be fine if a browser opened a single connection

Re: To whoever hacked into my Database

2013-11-08 Thread Ned Deily
Please! Everyone! Take this discussion elsewhere. It is way off-topic and the negative energy is damaging this forum for everyone else. "The Python Software Foundation and the global Python community welcome and encourage participation by everyone. Our community is based on mutual respect, t

Re: To whoever hacked into my Database

2013-11-08 Thread Joel Goldstick
twit is I think ok to say. The other word is pretty rude On Fri, Nov 8, 2013 at 12:09 PM, Νίκος Αλεξόπουλος wrote: > Στις 8/11/2013 7:01 μμ, ο/η unknown έγραψε: >> >> On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε: On Fri,

Re: To whoever hacked into my Database

2013-11-08 Thread rurpy
On 11/08/2013 03:05 AM, Νίκος Αλεξόπουλος wrote: > I never ignore advices. > I read all answers as carefully as i can. > But nevertheless sometimes i feel things should have been better > implemented using my way. > > Not of course that i know better, but thats better suited for me in the > leve

Re: To whoever hacked into my Database

2013-11-08 Thread Joel Goldstick
On Fri, Nov 8, 2013 at 8:48 AM, Νίκος Αλεξόπουλος wrote: > Στις 8/11/2013 3:12 μμ, ο/η Tim Delaney έγραψε: >> >> On 8 November 2013 21:00, Νίκος Αλεξόπουλος > > wrote: >> >> I have never exposed my client's data. Prove otherwise. >> >> >> https://mail.python.org/p

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 7:01 μμ, ο/η unknown έγραψε: On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote: Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε: On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote: Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε: But let's not waste any more t

Re: To whoever hacked into my Database

2013-11-08 Thread unknown
On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote: > Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε: >> On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε: >>> But let's not waste any more time on this. Please get back t

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε: On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote: Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε: But let's not waste any more time on this. Please get back to checking your web site. She might have been hacking again. Or little fing

Re: To whoever hacked into my Database

2013-11-08 Thread unknown
On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote: > Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε: > >> But let's not waste any more time on this. Please get back to checking >> your web site. She might have been hacking again. Or little fingers >> from one of my highly paid cont

Re: To whoever hacked into my Database

2013-11-08 Thread Νίκος Αλεξόπουλος
Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε: But let's not waste any more time on this. Please get back to checking your web site. She might have been hacking again. Or little fingers from one of my highly paid contractors might have been up to no good. Oh but I forgot, you've made it ha

Re: To whoever hacked into my Database

2013-11-08 Thread unknown
> > You have demonstrated significant difficulties in social interaction and > behavior. Pot - Kettle -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-08 Thread Antoon Pardon
Op 08-11-13 16:15, Νίκος Αλεξόπουλος schreef: > Στις 8/11/2013 4:02 μμ, ο/η Mark Lawrence έγραψε: >> On 08/11/2013 10:09, Chris Angelico wrote: >>> On Fri, Nov 8, 2013 at 9:00 PM, Mark Lawrence >>> wrote: On 08/11/2013 09:52, Chris Angelico wrote: > Mar-Kal El-awrence! Able to leap tall b

Re: Talking to a 'C' program

2013-11-08 Thread John Pote
Thanks everyone for the advice, some good ideas to keep me busy. Will try and look at over weekend/next week as tied up the rest of today. I've used pyserial several times - many thanks to Chris Liechti for that module Hm must be loosing it, forgot about stdin/out! I've also used CUnit bef

Re: To whoever hacked into my Database

2013-11-08 Thread Mark Lawrence
On 08/11/2013 15:15, Νίκος Αλεξόπουλος wrote: Στις 8/11/2013 4:02 μμ, ο/η Mark Lawrence έγραψε: On 08/11/2013 10:09, Chris Angelico wrote: On Fri, Nov 8, 2013 at 9:00 PM, Mark Lawrence wrote: On 08/11/2013 09:52, Chris Angelico wrote: Mar-Kal El-awrence! Able to leap tall bridges in a single

  1   2   >