On Thu, Apr 21, 2016, at 08:33 PM, Christopher Reimer wrote:
> On 4/21/2016 7:20 PM, Stephen Hansen wrote:
> > I... that... what... I'd forget that link and pretend you never went
> > there. Its not helpful.
>
> I found it on the Internet, so it must be true -- and Pythonic at that!
My advice is
On Thu, Apr 21, 2016 at 11:15 PM, Allan Leo wrote:
> On Apr 21, 2016 9:51 PM, "eryk sun" wrote:
>> On Thu, Apr 21, 2016 at 4:06 AM, Allan Leo wrote:
>> > When running the setup for your 3.5.1(32-bit version), the setup
>> > experiences error 0*80070570 and tells me to check the log file. What
>
On 04/21/2016 08:33 PM, Christopher Reimer wrote:
On 4/21/2016 7:20 PM, Stephen Hansen wrote:
Keep in mind that I'm coming from a Java background (not by choice) with
a smattering of C programming.
A refugee! Water! Food! import this!! :)
Oh! and Enum!!! ;)
--
~Ethan~
--
https://mai
On 4/21/2016 7:20 PM, Stephen Hansen wrote:
Whyyy are you using getattr? Something wrong with
PieceFactory.factory(color, piece, position)? (Or, better yet, yield
piece_factory(color, piece, position) where piece_factory is just a
function)
Because the example I found used it, I implemented i
On 4/21/2016 7:10 PM, Ethan Furman wrote:
I do plan to incorporate a sanity test in each Piece class to validate
the initial position value. Pawns have 16 specific positions. Bishop,
Knight and Rook each have four specific positions. King and Queen each
have two specific positions. An invalid val
On 4/21/2016 6:54 PM, Tim Chase wrote:
I'd simplify this code to something like
class PieceFactory(object):
@staticmethod
def factory(color, piece, position):
try:
return {
'Bishop': Bishop,
'King': King,
'Knight': Knight,
On Fri, 22 Apr 2016 11:34 am, Christopher Reimer wrote:
> Greetings,
>
> Thanks to everyone for providing feedback. Here's my revised code to
> generate a set of chess pieces.
> class PieceFactory(object):
>
> def factory(color, piece, position):
> if piece == 'Bishop':
>
On 2016-04-21 18:34, Christopher Reimer wrote:
> class PieceFactory(object):
>
> def factory(color, piece, position):
> if piece == 'Bishop':
> return Bishop(color, position)
> if piece == 'King':
> return King(color, position)
>
On Thu, Apr 21, 2016, at 06:34 PM, Christopher Reimer wrote:
> class PieceFactory(object):
>
> def factory(color, piece, position):
> if piece == 'Bishop':
> return Bishop(color, position)
> if piece == 'King':
> return King(colo
On 04/21/2016 06:34 PM, Christopher Reimer wrote:
class PieceFactory(object):
> [...]
Better.
I do plan to incorporate a sanity test in each Piece class to validate
the initial position value. Pawns have 16 specific positions. Bishop,
Knight and Rook each have four specific positions. King a
Às 22:43 de 21-04-2016, Paulo da Silva escreveu:
> Hi.
>
> Why in this code fragment self.__name is not kept between pickle
> dumps/loads? How to fix it?
>
> Thanks.
>
> import pickle
> import pandas as pd
> import numpy as np
>
> class C(pd.DataFrame):
> def __init__(self,name,*a,**b):
>
Greetings,
Thanks to everyone for providing feedback. Here's my revised code to
generate a set of chess pieces.
class PieceFactory(object):
def factory(color, piece, position):
if piece == 'Bishop':
return Bishop(color, position)
if piece == 'K
Hi.
Why in this code fragment self.__name is not kept between pickle
dumps/loads? How to fix it?
Thanks.
import pickle
import pandas as pd
import numpy as np
class C(pd.DataFrame):
def __init__(self,name,*a,**b):
super(C,self).__init__(*a,**b)
self.__name
On Thu, Apr 21, 2016 at 4:06 AM, Allan Leo wrote:
> When running the setup for your 3.5.1(32-bit version), the setup
> experiences error 0*80070570 and tells me to check the log file. What could
> be the problem and whats the solution.
ERROR_FILE_CORRUPT (0x0570) seems to occur frequently with t
On Thursday, April 21, 2016 at 10:47:04 AM UTC-7, Allan Leo wrote:
> I need help with this setup error.
> -- Forwarded message --
> From: "Allan Leo"
> Date: Apr 21, 2016 10:06 AM
> Subject: Re: Error 0*80070570
> To:
> Cc:
>
> When running the setup for your 3.5.1(32-bit versio
> From: Lele Gaifax
> Date: Thu, 21 Apr 2016 21:04:32 +0200
> Cc: python-list@python.org
>
> is there a particular reason for the slightly different names that Emacs
> (version 25.0.92) and Python (version 3.6.0a0) give to a single Unicode
> entity?
They don't.
> Just to mention one codepoint,
>From time to time there are DNA related question posted here. I came
upon this in the hopes it may be useful to those who do that kind of
software
http://benchling.engineering/dna-regex-search/
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
htt
On Thu, Apr 21, 2016, at 10:46 AM, Allan Leo wrote:
> I need help with this setup error.
> -- Forwarded message --
> From: "Allan Leo"
> Date: Apr 21, 2016 10:06 AM
> Subject: Re: Error 0*80070570
> To:
> Cc:
>
> When running the setup for your 3.5.1(32-bit version), the setup
>
Random832 schrieb am 21.04.2016 um 18:35:
> I was trying to write a proof of concept on including descriptors (e.g.
> a "sys.recursionlimit" instead of set/get methods) in the sys module,
> and couldn't figure out how to "properly" define a type using
> PyType_FromSpecWithBases. Everything I tried
I need help with this setup error.
-- Forwarded message --
From: "Allan Leo"
Date: Apr 21, 2016 10:06 AM
Subject: Re: Error 0*80070570
To:
Cc:
When running the setup for your 3.5.1(32-bit version), the setup
experiences error 0*80070570 and tells me to check the log file. What c
On Thu, Apr 21, 2016 at 11:35 AM, Random832 wrote:
> I was trying to write a proof of concept on including descriptors (e.g.
> a "sys.recursionlimit" instead of set/get methods) in the sys module,
> and couldn't figure out how to "properly" define a type using
> PyType_FromSpecWithBases. Everythin
I was trying to write a proof of concept on including descriptors (e.g.
a "sys.recursionlimit" instead of set/get methods) in the sys module,
and couldn't figure out how to "properly" define a type using
PyType_FromSpecWithBases. Everything I tried just segfaulted. I ended up
just calling PyObject_
On Fri, Apr 22, 2016 at 1:19 AM, justin walters
wrote:
> I agree with the others that the new syntax is not needed.
>
> I would also like to point out that I believe any new added syntax or
> functionality should avoid the use of '*' and '**' as both of these
> characters are already used for many
On Thu, Apr 21, 2016 at 2:06 AM, Allan Leo wrote:
> When running the setup for your 3.5.1(32-bit version), the setup
> experiences error 0*80070570 and tells me to check the log file. What could
> be the problem and whats the solution.
> On Apr 21, 2016 7:05 AM, "Allan Leo" wrote:
>
> > When ru
I agree with the others that the new syntax is not needed.
I would also like to point out that I believe any new added syntax or
functionality should avoid the use of '*' and '**' as both of these
characters are already used for many things such as optional arguments and
mathematical operators. Ad
On Fri, Apr 22, 2016 at 12:30 AM, Oscar Benjamin
wrote:
> On 21 April 2016 at 15:12, Chris Angelico wrote:
>> On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
>> wrote:
>>> In the recursive stack overflow case what you'll usually have is
>>>
>>> 1) A few frames leading up to the start of recursi
On 21 April 2016 at 15:12, Chris Angelico wrote:
> On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
> wrote:
>> In the recursive stack overflow case what you'll usually have is
>>
>> 1) A few frames leading up to the start of recursion
>> 2) A long repetitive sequence of frames
>> 3) A few frames
On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
wrote:
> In the recursive stack overflow case what you'll usually have is
>
> 1) A few frames leading up to the start of recursion
> 2) A long repetitive sequence of frames
> 3) A few frames at the end showing how the exception was ultimately trigge
On 21 April 2016 at 13:15, Steven D'Aprano wrote:
> On Thu, 21 Apr 2016 06:53 pm, Oscar Benjamin wrote:
>
>> On 21 April 2016 at 04:07, Steven D'Aprano wrote:
>>> I want to group repeated items in a sequence. For example, I can group
>>> repeated sequences of a single item at a time using groupby
harirammano...@gmail.com writes:
> On Monday, April 18, 2016 at 12:38:03 PM UTC+5:30,
> hariram...@gmail.com wrote:
>> HI All,
>>
>> can you help me out in doing below.
>>
>> file:
>>
>> guava
>> fruit
>>
>>
>> mango
>> fruit
>>
>>
>> orange
>> fruit
>>
>>
>> need to dele
On Thu, 21 Apr 2016 06:53 pm, Oscar Benjamin wrote:
> On 21 April 2016 at 04:07, Steven D'Aprano wrote:
>> I want to group repeated items in a sequence. For example, I can group
>> repeated sequences of a single item at a time using groupby:
>>
>>
>> from itertools import groupby
>> for key, grou
On Thu, 21 Apr 2016 18:05:40 +1000, Steven D'Aprano wrote:
> The specific problem I am trying to solve is that I have a sequence of
> strings (in this case, error messages from a Python traceback) and I'm
> looking for repeated groups that may indicate mutually recursive calls. E.g.
> suppose I
On 21.04.16 06:07, Steven D'Aprano wrote:
Now I want to group subsequences. For example, I have:
"ABCABCABCDEABCDEFABCABCABCB"
and I want to group it into repeating subsequences.
[...]
How can I do this? Does this problem have a standard name and/or solution?
This is a part of lossless da
harirammano...@gmail.com wrote:
> On Monday, April 18, 2016 at 12:38:03 PM UTC+5:30, hariram...@gmail.com
> wrote:
>> HI All,
>>
>> can you help me out in doing below.
>>
>> file:
>>
>> guava
>> fruit
>>
>>
>> mango
>> fruit
>>
>>
>> orange
>> fruit
>>
Is that literally what you have i
On Monday, April 18, 2016 at 12:38:03 PM UTC+5:30, hariram...@gmail.com wrote:
> HI All,
>
> can you help me out in doing below.
>
> file:
>
> guava
> fruit
>
>
> mango
> fruit
>
>
> orange
> fruit
>
>
> need to delete from start to end if it contains mango in a file...
>
When running the setup for your 3.5.1(32-bit version), the setup
experiences error 0*80070570 and tells me to check the log file. What could
be the problem and whats the solution.
On Apr 21, 2016 7:05 AM, "Allan Leo" wrote:
> When running the setup for your 3.5.1(32-bit version) the setup
> expe
On 21 April 2016 at 04:07, Steven D'Aprano wrote:
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
>
>
> from itertools import groupby
> for key, group in groupby("BBCDDEEE"):
> group = list(group)
>
On Thursday 21 April 2016 16:35, Michael Selik wrote:
> On Wed, Apr 20, 2016 at 11:11 PM Steven D'Aprano
> wrote:
>
>> I want to group [repeated] subsequences. For example, I have:
>> "ABCABCABCDEABCDEFABCABCABCB"
>> and I want to group it into repeating subsequences. I can see two
>> ways... Ho
Steven D'Aprano writes:
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
[...]
> Now I want to group subsequences. For example, I have:
>
> "ABCABCABCDEABCDEFABCABCABCB"
>
> and I want to group it into repeatin
On Thu, Apr 21, 2016 at 2:55 AM Vlastimil Brom
wrote:
> 2016-04-21 5:07 GMT+02:00 Steven D'Aprano :
> > I want to group subsequences.
> > "ABCABCABCDEABCDEFABCABCABCB"
> > ABC ABC ABCDE ABCDE F ABC ABC ABC B
> > or:
> > ABC ABC ABC D E A B C D E F ABC ABC ABC B
>
> if I am not missing something,
40 matches
Mail list logo