On 23/10/2013 16:24, Cesar Campana wrote:
> Hi!
>
> Im installing the python library for the version 2.7 but Im getting the
> error unable to find vcvarsall.bat
>
> I was looking on line but it says is related to Visual Studio...?
>
> Can you guys please help me to fix this...
>
The other respons
On 24/10/2013 21:38, Victor Hooi wrote:
> Hi,
>
> We have a directory of large CSV files that we'd like to process in Python.
>
> We process each input CSV, then generate a corresponding output CSV file.
>
> input CSV -> munging text, lookups etc. -> output CSV
>
> My question is, what's the most
On 24/10/2013 23:35, Steven D'Aprano wrote:
> On Fri, 25 Oct 2013 02:10:07 +0000, Dave Angel wrote:
>
>>> If I have multiple large CSV files to deal with, and I'm on a
>>> multi-core machine, is there anything else I can do to boost
>>> throughput?
On 25/10/2013 02:13, Chris Angelico wrote:
> On Fri, Oct 25, 2013 at 2:57 PM, Dave Angel wrote:
>> But I would concur -- probably they'll both give about the same speedup.
>> I just detest the pain that multithreading can bring, and tend to avoid
>> it if at all po
On 27/10/2013 03:31, Nick the Gr33k wrote:
> Στις 27/10/2013 6:00 πμ, ο/η ru...@yahoo.com έγραψε:
>
> I read it thoroughly and tested it and it works as it should.
>
> I just wanted to mention that the definition of the function coalesce()
> must come prior of:
>
>> newdata = coal
On 27/10/2013 11:31, Colin J. Williams wrote:
> On 27/10/2013 10:32 AM, David wrote:
>> I am an absolute beginner and am working through the book Python Programming
>> for the Absolute Beginner by Michael Dawson. Everything is fine except if I
>> run a scripted programme, or one I have download
On 29/10/2013 14:05, Robert Gonda wrote:
& >> Back to question, name is also not working, I currently have
python 3.3.2 and the only to get that work is the write raw_input, I
have no idea why, did i do soemthing wrong?
Why did you add those two >> symbols in front of your new text? Each
such
On 29/10/2013 14:35, jonas.thornv...@gmail.com wrote:
(Deleting hundreds of quad-spaced garbage. Please be more considerate
of others if you choose to use buggy googlegroups, maybe starting by
studying:
)
Please indent by 4 columns, not 1. Since indentation is how scope is
specified in Python,
On 29/10/2013 15:15, Robert Gonda wrote:
(once again deleting all the double-spaced Googlegroups nonsense)
>
&& >>Hi dave, yes you was right. I had python 2.7 but I upgraded to
python 3 now, thanks for help :) by the way, is this showing normally?
No, you're still adding a ">" character before t
On 29/10/2013 16:11, jonas.thornv...@gmail.com wrote:
> Den tisdagen den 29:e oktober 2013 kl. 21:08:39 UTC+1 skrev
> jonas.t...@gmail.com:
>> Den tisdagen den 29:e oktober 2013 kl. 20:24:57 UTC+1 skrev Dave Angel:
>
> They could had used print and prinln from basic? I do
On 29/10/2013 17:29, patrick vrijlandt wrote:
> Hello list,
>
> Python has been a hobby for me since version 1.5.2. Over the years I
> accumulated quite a lot of reusable code. It is nicely organised in
> modules, directories and subdirectories. With every project, the library
> grows and is devel
On 29/10/2013 21:42, Joseph L. Casale wrote:
You forgot the attribution line: "Victor says"
>> with open(self.full_path, 'r') as input, open(self.output_csv, 'ab') as
>> output:
>> fieldnames = (...)
>> csv_writer = DictWriter(output, filednames)
>> # Call csv_writer.w
On 30/10/2013 12:31, jonas.thornv...@gmail.com wrote:
>
> No that is not my problem, apparently so it is that the newsreader
> constructors do not like the competition of Google groups otherwise they
> would had written the five lines of codes necessary to remove the empty
> linebreaks.
> I li
On 30/10/2013 14:21, jonas.thornv...@gmail.com wrote:
> I am searching for the program or algorithm that makes the best possible of
> completly (diffused data/random noise) and wonder what the state of art
> compression is.
>
> I understand this is not the correct forum but since i think i have
On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.thornv...@gmail.com
wrote:
Den lördagen den 2:e november 2013 kl. 22:31:09 UTC+1 skrev Tim
Roberts:
> Here's another way to look at it. If f(x) is smaller than x for
every x,
> that means there MUST me multiple values of x that produce the
On Mon, 4 Nov 2013 14:34:23 -0800 (PST), jonas.thornv...@gmail.com
wrote:
e is an approximation... and your idea is not general for any n.
e is certainly not an approximation, and I never mentioned n.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 05 Nov 2013 11:34:53 +0200, Nick the Gr33k
wrote:
I see, but because of the traceback not being to express it more
easily
i was under the impression that data wasn't what i expected it to
be.
Exactly. So why didn't you act on that impression?
Your error message told you that data wa
On Tue, 05 Nov 2013 12:33:49 +0200, Nick the Gr33k
wrote:
Στις 5/11/2013 12:20 μμ, ο/η Antoon Pardon έγραψε:
> Did you read the documentation of fetchone?
fetchone is like fetchall except from the fact that the former
returned
a row of data while the latter returned a list of rows of dat
On Tue, 05 Nov 2013 14:25:41 +0200, Nick the Gr33k
wrote:
i tried inserting a type function to notify me of the datatype of
'data'
but that didnt help too.
What did that print show ? In what way didn't it help?
It said the type was Charles
It didn'tprint anything
It gave some other error
It
On Tue, 05 Nov 2013 16:32:57 +0330, Mohsen Pahlevanzadeh
wrote:
Suppose i have a variable such as : myVar = 'x'
May be it initialized with myVar = u'x' or myVar = 'x'
So i need determine content of myVar that it's utf-8 or not, how
can i
do it?
Use the type() function and compare to un
On Tue, 5 Nov 2013 09:45:15 -0600, Tim Chase
wrote:
You're assigning it to the bound function rather than calling the
function. Use the "call" operator:
data = infile.readlines()
Thanks for spoiling the lesson. Nicks needs to learn how to debug 4
line programs without someone giving him
On Tue, 5 Nov 2013 17:51:00 -0800 (PST), chovd...@gmail.com wrote:
result += ((-1) ** (k+1))/2*k-1
One of two things are happening here. Maybe both.
You're using Python 2.x (and should havesaid so) where integer
division is truncated.
You're missing around some part of the intende
On 5 Nov 2013 15:30:19 GMT, Neil Cerutti wrote:
On 2013-11-05, Dave Angel wrote:
> On Tue, 05 Nov 2013 16:32:57 +0330, Mohsen Pahlevanzadeh
>> May be it initialized with myVar = u'x' or myVar = 'x'
My solution assumed he wanted to distinguish between th
On Thu, 7 Nov 2013 18:43:17 -0800, Mark Janssen
wrote:
I think the idea would be to find the prime factorization for a
given
number, which has been proven to be available (and unique) for any
and
every number. Most numbers can compress given this technique.
Prime
numbers, of course, woul
On Mon, 11 Nov 2013 01:41:58 -0800 (PST), JL
wrote:
- If the event happens again before the 5secs expire, the high
duration will be extended by another 5 secs. This works like a
retriggerable multivibrator for those who are into electronics.
More precisely a retriggerable monostable multivibr
On 02/26/2015 08:05 PM, Steven D'Aprano wrote:
Rustom Mody wrote:
eg consider the case of 32 vs 64 bit executables.
The 64 bit executable is generally larger than the 32 bit one
Now consider the case of a machine that has say 2GB RAM and a 64-bit
processor. You could -- I think -- make a re
On 02/27/2015 12:58 AM, Steven D'Aprano wrote:
Dave Angel wrote:
(Although I believe Seymour Cray was quoted as saying that virtual
memory is a crock, because "you can't fake what you ain't got.")
If I recall correctly, disk access is about 1 times slower than
On 02/26/2015 10:53 PM, memilanuk wrote:
So... okay. I've got a bunch of PDFs of tournament reports that I want
to sift thru for information. Ended up using 'pdftotext -layout
file.pdf file.txt' to extract the text from the PDF. Still have a few
little glitches to iron out there, but I'm getti
On 02/27/2015 06:54 AM, Steven D'Aprano wrote:
Dave Angel wrote:
On 02/27/2015 12:58 AM, Steven D'Aprano wrote:
Dave Angel wrote:
(Although I believe Seymour Cray was quoted as saying that virtual
memory is a crock, because "you can't fake what you ain't got.")
On 02/27/2015 09:22 AM, Chris Angelico wrote:
On Sat, Feb 28, 2015 at 1:02 AM, Dave Angel wrote:
The term "virtual memory" is used for many aspects of the modern memory
architecture. But I presume you're using it in the sense of "running in a
swapfile" as opposed t
On 02/27/2015 11:00 AM, alister wrote:
On Sat, 28 Feb 2015 01:22:15 +1100, Chris Angelico wrote:
If you're trying to use the pagefile/swapfile as if it's more memory ("I
have 256MB of memory, but 10GB of swap space, so that's 10GB of
memory!"), then yes, these performance considerations are hu
On 02/27/2015 04:21 PM, Travis Griggs wrote:
On Feb 25, 2015, at 12:45 PM, Mark Lawrence wrote:
http://www.slideshare.net/pydanny/python-worst-practices
Any that should be added to this list? Any that be removed as not that bad?
I read ‘em. I thought they were pretty good, some more than
On 02/27/2015 04:40 PM, Chris Angelico wrote:
On Sat, Feb 28, 2015 at 8:37 AM, Dave Angel wrote:
Right. In C and C++, instead of being the first slide, it'd be the first 3
or 4. Between header file conflicts (especially good because the stdlib
itself has many multiply-defined sy
On 03/01/2015 08:59 PM, MRAB wrote:
On 2015-03-02 01:37, Dennis Lee Bieber wrote
You'd be able to run it on a TI99/4 (in which the BASIC interpreter,
itself, was run on an interpreter... nothing like taking the first
"16-bit"
home computer and shackling it with an interpreted language that
On 03/02/2015 02:59 AM, alb wrote:
Hi everyone,
I'm writing a document in restructured text and I'd like to convert it
to latex for printing. To accomplish this I've used semi-successfully
pandoc and the wrapper pypandoc.
I don't see other responses yet, so I'll respond even though i don't
kn
On 03/02/2015 01:00 AM, Sarvagya Pant wrote:
I have been writing a c++ program that is supposed to call the python
function. The code is a snippet from python.org itself.
#include
#include
#include
int main()
{
Py_SetProgramName("Learning");
Py_Initialize();
PyRun_SimpleString(
On 03/02/2015 07:38 AM, MRAB wrote:
On 2015-03-02 04:49, Dave Angel wrote:
On 03/01/2015 08:59 PM, MRAB wrote:
On 2015-03-02 01:37, Dennis Lee Bieber wrote
The 16 bit address bus permitted addressing of 64k words. On most
processors, that was 64k bytes, though I know one Harris had no
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano wrote:
[]
Since \r is an escape character, that will give you carriage return followed
by "ef{fig:abc".
The solution to that is to either escape the backslash:
i = '\\ref{fig:abc}'
or use a raw string:
i = r'\\ref{fig:abc}'
A
On 03/02/2015 09:43 AM, Steven D'Aprano wrote:
Dave Angel wrote:
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano wrote:
or use a raw string:
i = r'\\ref{fig:abc}'
Actually that'd be:
i = r'\ref{fig:abc}'
D'oh!
I mean, yo
On 03/02/2015 01:38 PM, Charles Heizer wrote:
Sorry,
sortedlist = sorted(mylist , key=lambda elem: "%s %s" % (elem['name'],
LooseVersion(elem['version'])), reverse=True)
This is what I was trying but LooseVersion() was not sorting version numbers like I thought it
would. You will notice that
I INTENDED to send it to the list, but made the same mistake myself.
Forwarded Message
Subject: Re: Python27.dll could not be found
Date: Mon, 02 Mar 2015 08:51:07 -0500
From: Dave Angel
To: Sarvagya Pant
Sarvaqya accidentally sent me private email, so I'm forwarding
On 03/02/2015 02:22 PM, Gisle Vanem wrote:
Dave Angel wrote:
When I ran Windows, I had written a simple utility that searched the
PATH for a specified file.
I called it which.bat to match the Linux equivalent.
I've written a similar tool; envtool --path --python python27.dll
Match
On 03/02/2015 05:40 PM, alb wrote:
Hi Dave,
Dave Angel wrote:
[]
or use a raw string:
i = r'\\ref{fig:abc}'
Actually that'd be:
i = r'\ref{fig:abc}'
Could you explain why I then see the following difference:
In [56]: inp = r'\\ref{fig:abc}'
On 03/02/2015 11:25 AM, Chris Angelico wrote:
On Tue, Mar 3, 2015 at 3:09 AM, alister
wrote:
Sounds ominous. Is that better or worse than the final solution?
As in "this program will inadvertantly self distruct in five seconds"?
It's usually implied as being externally enforced, so I'd say
On 03/02/2015 02:09 PM, Ben Finney wrote:
Dave Angel writes:
And D'oh right back at ya. Ironic isn't it that I make a second
mistake in the same message I correct yours?
https://en.wikipedia.org/wiki/Muphry%27s_law>
I guess that word is too small to qualify as a malapr
On 03/06/2015 05:32 AM, Gene Heskett wrote:
On Friday 06 March 2015 03:24:48 Abhiram R wrote:
A list of 100 elements has approximately 9.33 x 10**157
permutations. If you could somehow generate one permutation every
yoctosecond, exhausting them would still take more than a hundred
orders of ma
On 03/06/2015 01:44 AM, Abhiram R wrote:
Hi all,
Is there a way to generate permutations of large arrays of sizes say,in the
hundreds, faster than in the time itertools.permutations() can return?
When dealing with large loops like that (or even permutations of 50,
which is also gy-normous [1]
On 03/06/2015 11:14 AM, Gene Heskett wrote:
On Friday 06 March 2015 06:22:34 Dave Angel wrote:
Sorry, but 50! is not even close to 50**50. The latter is 85 digits
as you say, but 50! is "only" 64.
30414093201713378043612608166064768844377641568960512L
What util
On 03/07/2015 02:15 PM, Markos wrote:
Hi,
I'm beginning to study the numpy.
When I open a terminal (Debian Squeeze) and run the python interpreter
the command "import numpy as np" run without errors.
But when I run the same command on idle3 the following error appears.
import numpy as np
T
On 03/09/2015 08:45 PM, Paulo da Silva wrote:
Hi!
What is the best way to read a file that begins with some few text lines
and whose rest is a binary stream?
As an exmaple ... files .pnm.
Thanks for any comments/help on this.
In which version of Python? there's a huge difference between 2.
On 03/09/2015 08:56 PM, Chris Angelico wrote:
On Tue, Mar 10, 2015 at 11:45 AM, Paulo da Silva
wrote:
Hi!
What is the best way to read a file that begins with some few text lines
and whose rest is a binary stream?
As an exmaple ... files .pnm.
Thanks for any comments/help on this.
Read the
On 03/11/2015 10:41 AM, Wolfgang Maier wrote:
From the documentation of sys.executable:
A string giving the absolute path of the executable binary for the
Python interpreter, on systems where this makes sense. If Python is
unable to retrieve the real path to its executable, sys.executable
On 03/13/2015 09:24 PM, Steven D'Aprano wrote:
sohcahto...@gmail.com wrote:
We need more information than just "It doesn't work". You wouldn't go to
a car mechanic and say "It makes a funny noise", would you? No.
Actually, most likely yes.It's remarkably hard to describe noises, and often
On 03/14/2015 06:50 AM, Jason Heeris wrote:
I am trying to automate the use of some old, in-house terminal-based
programs that use screen redrawing for their interface. This includes
single line redrawing (eg. using '\r' and overwriting), complete screen
clearing, and fine-grained cursor movement
On 03/14/2015 12:51 PM, Chris Angelico wrote:
On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody wrote:
As best as I can see python makes no distinction between such a foo and
the more usual function/methods that have no returns.
You can I can talk about these and distinguish them
Python has no clue
On 03/14/2015 05:57 AM, Chris Angelico wrote:
On Sat, Mar 14, 2015 at 12:35 PM, Dave Angel wrote:
Not if you don't take it to him. If you just call him on the phone, and say
"Jimmy doesn't work" he doesn't even know what make and model the vehicle
is. Or whether it
On 03/15/2015 03:09 PM, jonas.thornv...@gmail.com wrote:
Den söndag 15 mars 2015 kl. 20:01:36 UTC+1 skrev Paul Rubin:
jonas.thornv...@gmail.com writes:
I though it would be interesting doing comparissons in timing adding
massive digits in different bases. Especially in Python.
Python has buil
On 03/16/2015 03:36 AM, Chris Angelico wrote:
On Mon, Mar 16, 2015 at 6:32 PM, Dave Angel wrote:
Assuming Python 3.x of course. if you're in Python 2, you'd use "long"
rather than int.
Not sure you need to bother. Even in Py2, you can use the int
constructor to get a lon
On 03/23/2015 12:01 PM, Ganesh Pal wrote:
Hello team ,
[root@localhost Python]# cat fibonacci-Sequence-3.py
## Example 2: Using recursion
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)
print fib(5)
# python fi
On 03/23/2015 12:59 PM, Chris Angelico wrote:
On Tue, Mar 24, 2015 at 3:16 AM, Dave Angel wrote:
An entirely separate question is whether you can gain performance by caching
intermediate values. For example, if you capture values in a list, you
could potentially save a lot of time, at least
On 03/23/2015 12:16 PM, Chris Angelico wrote:
On Tue, Mar 24, 2015 at 3:01 AM, Ganesh Pal wrote:
Hello team ,
[root@localhost Python]# cat fibonacci-Sequence-3.py
## Example 2: Using recursion
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
On 03/23/2015 05:31 PM, Carsten Lechte wrote:
On 23/03/15 19:44, Dave Angel wrote:
I'll give you a worse version. Back in the day I had occasion to
write a simple program
in a language which had no add or subtract. It could only increment
and decrement
indices.
Oh yes, the olden da
On 03/23/2015 06:53 PM, Terry Reedy wrote:
On 3/23/2015 2:44 PM, Dave Angel wrote:
## Example 2: Using recursion with caching
cache = [0, 1]
def fib4(n):
if len(cache) <= n:
value = fib4(n-2) + fib4(n-1)
cache.append(value)
return cache[n]
This one takes less t
On 03/23/2015 07:49 PM, Chris Angelico wrote:
On Tue, Mar 24, 2015 at 10:12 AM, Dave Angel wrote:
On the other hand, my loop makes some non-obvious assumptions, like that
append is always the right place to put a new value.
Yes, I had to stop and think about that one a bit. And that strongly
On 03/23/2015 08:19 PM, Steven D'Aprano wrote:
On Tue, 24 Mar 2015 03:16 am, Chris Angelico wrote about the standard
recursive version of the Fibonacci series:
On Tue, Mar 24, 2015 at 3:01 AM, Ganesh Pal wrote:
def fib(n):
if n == 0:
return 0
elif n == 1:
return
On 03/23/2015 08:27 PM, Chris Angelico wrote:
On Tue, Mar 24, 2015 at 11:09 AM, Dave Angel wrote:
Repeat to self: comment first, then write test, then write the code.
Reply to self: Maybe next time.
Commenting is like dieting. You can always start tomorrow.
It reminds me of flow charts
On 03/25/2015 03:43 PM, Gregg Dotoli wrote:
This basic script will help to find
evidence of CryptoWall on a slave drive. Although it is
just a string, more complex regex patterns can be
replaced with the string. It is incredible how fast Python is and
how easy it has helped in quickly assessing
On 03/26/2015 01:09 AM, Ian Kelly wrote:
>
>
>
https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
What the grammar that you quoted from shows is that STRING+ is an
expression. The individual STRINGs of a STRING+ are not expressions,
except to the extent t
On 03/26/2015 08:37 AM, Chris Angelico wrote:
On Thu, Mar 26, 2015 at 11:26 PM, Marko Rauhamaa wrote:
"Frank Millman" :
Here is another python-based sudoku solver -
http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py
>From its docstring -
"A proper Sudoku puzzle must have a unique solution, an
On 03/26/2015 10:41 AM, Chris Angelico wrote:
that's already been proven. So, that's why I would avoid guessing.
I've written a lot of solvers for various puzzles. Minesweeper,
Sudoku, a binary Sudoku-like puzzle that I don't really have a good
name for, several others. Every time, I've tried t
On 03/26/2015 01:11 PM, Gregg Dotoli wrote:
On Wednesday, March 25, 2015 at 3:43:38 PM UTC-4, Gregg Dotoli wrote:
This basic script will help to find
evidence of CryptoWall on a slave drive. Although it is
just a string, more complex regex patterns can be
replaced with the string. It is incredib
On 03/26/2015 09:41 PM, Rustom Mody wrote:
On Thursday, March 26, 2015 at 11:30:57 AM UTC+5:30, Chris Angelico wrote:
Python 3.5.0a0 (default:4709290253e3, Jan 20 2015, 21:48:07)
[GCC 4.7.2] on linux
class filter(object)
| filter(function or None, iterable) --> filter object
|
| Retur
On 03/27/2015 05:25 AM, Chris Angelico wrote:
On Fri, Mar 27, 2015 at 8:07 PM, Frank Millman wrote:
There seems to be disagreement over the use of the term 'trial and error'.
How about this for a revised wording -
"It should be possible to reach that solution by a sequence of logical
deduction
On 03/27/2015 09:25 AM, Chris Angelico wrote:
On Sat, Mar 28, 2015 at 12:14 AM, Dave Angel wrote:
But now I have to disagree about "true Sudoku puzzle." As we said earlier,
it might make sense to say that puzzles that cannot be solved that way are
not reasonable ones to put in a hu
On 03/27/2015 09:35 AM, Frank Millman wrote:
"Dave Angel" wrote in message
news:551557b3.5090...@davea.name...
But now I have to disagree about "true Sudoku puzzle." As we said
earlier, it might make sense to say that puzzles that cannot be solved
that way are not reaso
On 03/27/2015 09:56 AM, Marko Rauhamaa wrote:
"Frank Millman" :
So what I am talking about is called a "satisfactory" puzzle, which is
a subset of a "proper" puzzle.
That is impossible to define, though, because some people are mental
acrobats and can do a lot of deep analysis in their heads.
On 03/29/2015 07:37 AM, Saran Ahluwalia wrote:
On Sunday, March 29, 2015 at 7:33:04 AM UTC-4, Saran Ahluwalia wrote:
Below are the function's requirements. I am torn between using the OS module or some
other quick and dirty module. In addition, my ideal assumption that this could be
cross-plat
On 03/30/2015 03:29 AM, Ian Kelly wrote:
On Mon, Mar 30, 2015 at 1:13 AM, Christian Gollwitzer wrote:
Am 30.03.15 um 08:50 schrieb Ian Kelly:
On Sun, Mar 29, 2015 at 12:03 PM, Marko Rauhamaa wrote:
Be careful with the benchmark comparisons. Ian's example can be solved
with the identical al
On 03/30/2015 12:45 PM, Saran A wrote:
On Sunday, March 29, 2015 at 10:04:45 PM UTC-4, Chris Angelico wrote:
On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin wrote:
Saran Ahluwalia writes:
cross-platform...
* Monitors a folder for files that are dropped throughout the day
I don't see a cross-p
On 03/31/2015 07:00 AM, Saran A wrote:
> @DaveA: This is a homework assignment. Is it possible that you
could provide me with some snippets or guidance on where to place your
suggestions (for your TO DOs 2,3,4,5)?
>
On Monday, March 30, 2015 at 2:36:02 PM UTC-4, Dave Angel
On 03/31/2015 09:18 AM, Albert van der Horst wrote:
In article <55062bda$0$12998$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
The biggest difference is syntactic. Here's an iterator which returns a
never-ending sequence of squared numbers 1, 4, 9, 16, ...
class Squares:
On 04/01/2015 09:43 AM, Saran A wrote:
On Tuesday, March 31, 2015 at 9:19:37 AM UTC-4, Dave Angel wrote:
On 03/31/2015 07:00 AM, Saran A wrote:
> @DaveA: This is a homework assignment. Is it possible that you
could provide me with some snippets or guidance on where to place y
On 04/02/2015 09:06 AM, Saran A wrote:
Thanks for your help on this homework assignment. I started from scratch last
night. I have added some comments that will perhaps help clarify my intentions
and my thought process. Thanks again.
from __future__ import print_function
I'll just randomly
On 04/02/2015 07:43 PM, Saran A wrote:
I debugged and rewrote everything. Here is the full version. Feel free to tear
this apart. The homework assignment is not due until tomorrow, so I am
currently also experimenting with pyinotify as well. I do have questions
regarding how to make this
On 04/03/2015 07:37 AM, Steven D'Aprano wrote:
On Fri, 3 Apr 2015 12:30 pm, Saran A wrote:
#This helper function returns the length of the file
def file_len(f):
with open(f) as f:
for i, l in enumerate(f):
pass
return i + 1
Not as given it doesn't. It w
On 04/03/2015 08:50 AM, Saran A wrote:
On Friday, April 3, 2015 at 8:05:14 AM UTC-4, Dave Angel wrote:
On 04/02/2015 07:43 PM, Saran A wrote:
I addressed most of the issues. I do admit that, as a novice, I feel beholden
to the computer - hence the over-engineering.
Should be quite the
On 04/05/2015 01:45 PM, Alexey Izbyshev wrote:
Hello!
I've hit a strange problem that I reduced to the following test case:
* Run several python processes in parallel that spin in the following loop:
while True:
if os.path.isfile(fname):
with open(fname, 'rb') as f:
f.read()
On 04/07/2015 05:44 AM, jonas.thornv...@gmail.com wrote:
I want todo faster baseconversion for very big bases like base 1 000 000, so
instead of adding up digits i search it.
For this and most of the following statements: I can almost guess what
you're trying to say. However, I cannot. N
On 04/07/2015 10:10 AM, jonas.thornv...@gmail.com wrote:
Den tisdag 7 april 2015 kl. 15:30:36 UTC+2 skrev Dave Angel:
If that code were in Python, I could be more motivated to critique it.
The whole algorithm could be much simpler. But perhaps there is some
limitation of javascript
On 04/07/2015 10:36 AM, jonas.thornv...@gmail.com wrote:
All operations on integers addition, subtraction, multiplication and division
assume base 10.
There have been machines where that was true, but I haven't worked on
such for about 30 years. On any machines I've programmed lately, the
On 04/07/2015 11:05 AM, Grant Edwards wrote:
On 2015-04-07, Chris Angelico wrote:
On Wed, Apr 8, 2015 at 12:36 AM, wrote:
Integers are internally assumed to be base 10 otherwise you could not
calculate without giving the base.
All operations on integers addition, subtraction, multiplicatio
On 04/07/2015 11:40 AM, jonas.thornv...@gmail.com wrote:
Den tisdag 7 april 2015 kl. 16:32:56 UTC+2 skrev Ian:
On Tue, Apr 7, 2015 at 3:44 AM, wrote:
I want todo faster baseconversion for very big bases like base 1 000 000, so
instead of adding up digits i search it.
I need the fastest al
On 04/07/2015 11:39 AM, blue wrote:
Dear friends .
I want to install Euler module under python 2.7 and / or 3.4 version.
I try pip and pip 3.4 but seam not working for me.
I need some help with this .
Thank you . Regards.
You don't specify what you mean by Euler. There are at least 3 things
On 04/07/2015 06:35 PM, jonas.thornv...@gmail.com wrote:
Den tisdag 7 april 2015 kl. 21:27:20 UTC+2 skrev Ben Bacarisse:
Ian Kelly writes:
On Tue, Apr 7, 2015 at 12:55 PM, Terry Reedy wrote:
On 4/7/2015 1:44 PM, Ian Kelly wrote:
def to_base(number, base):
... digits = []
... whi
On 04/10/2015 04:48 AM, Pavel S wrote:
Hi,
I noticed interesting behaviour. Since I don't have python3 installation here,
I tested that on Python 2.7.
Well known feature is that try..except block can catch multiple exceptions
listed in a tuple:
exceptions = ( TypeError, ValueError )
try:
On 04/10/2015 07:37 PM, ravas wrote:
def m_and_m(dividend):
rlist = []
dm = divmod
end = (dividend // 2) + 1
for divisor in range(1, end):
q, r = dm(dividend, divisor)
if r is 0:
rlist.append((divisor, q))
return rlist
print(m_and_m(999))
-
On 04/10/2015 09:06 PM, Dave Angel wrote:
On 04/10/2015 07:37 PM, ravas wrote:
def m_and_m(dividend):
rlist = []
dm = divmod
end = (dividend // 2) + 1
for divisor in range(1, end):
q, r = dm(dividend, divisor)
if r is 0:
rlist.append((divisor
On 04/09/2015 08:56 AM, Alain Ketterlin wrote:
Marko Rauhamaa writes:
Alain Ketterlin :
No, it would not work for signed integers (i.e., with lo and hi of
int64_t type), because overflow is undefined behavior for signed.
All architectures I've ever had dealings with have used 2's-complemen
On 04/09/2015 05:33 AM, janhein.vanderb...@gmail.com wrote:
Op donderdag 19 februari 2015 19:25:14 UTC+1 schreef Dave Angel:
I wrote the following pair of functions:
Here's a couple of ranges of output, showing that the 7bit scheme does
better for values between 384 and 16379.
T
On 04/10/2015 09:42 PM, Steven D'Aprano wrote:
On Sat, 11 Apr 2015 05:31 am, sohcahto...@gmail.com wrote:
It isn't document because it is expected. Why would the exception get
caught if you're not writing code to catch it? If you write a function
and pass it a tuple of exceptions to catch, I'
1301 - 1400 of 2696 matches
Mail list logo