My dear friends here, all i want is get ` LMT+8:06:00` from the
output of tz1 ``
Shall we get back to the main point?
If you are interested in it ,please say yes or no ,and how to do that ?
import pytz,datetime
tz1 = pytz.timezone('Asia/Shanghai')
tz1
>>> str(tz1)
'Asia/Shanghai'
--
ht
My dear friends here, all i want is get ` |LMT+8:06:00` from the
output of tz1 `||`|
Shall we get back to the main point?
If you are interested in it ,please say yes or no ,and how to do that ?
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, August 19, 2014 2:05:01 AM UTC+5:30, ElChino wrote:
> A newbie question to you; what is the difference between statements
> like:
> if x is not None:
> and
> if x != None:
> Without any context, which one should be preferred?
> IMHO, the latter is more readable.
Here is Terry Reed
On Monday, 18 August 2014 23:13:59 UTC+9:30, Chris Angelico wrote:
> On Mon, Aug 18, 2014 at 11:30 PM, Everything You Need To Know
>
> wrote:
>
> > You are correct in suggesting that the current course is Windows Specific,
> > though as far as I currently understand it only effects conditional
On Tue, Aug 19, 2014 at 1:34 AM, Furqan wasi wrote:
> except:
> print('Simple didnt work')
> pass
Drop all of these bare excepts. Let the exceptions get printed.
Believe you me, they are a LOT more helpful than "didnt work".
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
> Grant Edwards writes:
>
>> I agree with the comments that the appellation for "simply the next
>> version after 3.9" should be 3.10 and not 4.0. Everybody I know
>> considers SW versions numbers to be dot-separated tuples, not floating
>> point numbers.
>
> This consensus is
On 19 August 2014 00:51, Grant Edwards wrote:
> On 2014-08-17, Mark Lawrence wrote:
> > A blog from Nick Coghlan
> > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that
> > should help put a few minds to rest.
>
> I agree with the comments that the appellation for "simply the ne
On Tue, Aug 19, 2014 at 10:17 AM, Steven D'Aprano
wrote:
> I would love to see support for this in Python. Unfortunately, I'm not
> qualified to review your code. Can you create a feature request for it on
> the bug tracker, mark me (steven.daprano) as interested, and upload your
> diff? If the pa
On Tue, Aug 19, 2014 at 10:05 AM, Steven D'Aprano
wrote:
> I consider versions to be *strings*. They include non-numeric components
> such as "a", "b", "rc", so they aren't numbers. They're certainly not
> floating point numbers, since they have a variable number of decimal
> points. Although ther
Grant Edwards wrote:
> On 2014-08-18, Ethan Furman wrote:
>> On 08/18/2014 07:51 AM, Grant Edwards wrote:
>>>
>>> To all of us out here in user-land a change in the first value in the
>>> version tuple means breakage and incompatibilities. And when the
>>> second value is "0", you avoid it until
Lele Gaifax wrote:
> This is just a first attempt to adapt the Bash code to the Python
> readline.c module: I'm very surprised that the half-an-hour I spent on
> it, mostly to locate related code, actually full filled the goal :-)
You're my hero!!!
[...]
> Even if I know this is not the right fo
Jamie Mitchell wrote:
> I forgot to mention that when I try:
>
> a=np.array([[hs_con_sw],[te_con_sw]])
>
> I get a 3D shape for some reason - (2,1,150) which is not what I'm after.
No need to wrap the arrays hs_con_sw and te_con_sw in [] lists, since
they're already arrays.
a = np.array([hs_co
Grant Edwards wrote:
> On 2014-08-17, Mark Lawrence wrote:
>> A blog from Nick Coghlan
>> http://www.curiousefficiency.org/posts/2014/08/python-4000.html that
>> should help put a few minds to rest.
>
> I agree with the comments that the appellation for "simply the next
> version after 3.9" shou
On Tue, Aug 19, 2014 at 3:00 AM, ElChino wrote:
> Or lets make the version asymptotically grow towards 4.
> Any sensible function for that?
Easy! We just keep on adding parts.
3.7, 3.8, 3.9, 3.9.9, 3.9.9.9, 3.9.9.9.9, 3.9.9.9.9.9...
ChrisA
--
https://mail.python.org/mailman/listinfo/python-lis
Python 3 works fine, at least for BMP characters:
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600
32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> u"U+20AC is € is 0x80 in CP-1252"
'U+20AC is € is 0x80 in CP-1252'
>>> ascii(_)
"'U+
Alex Willmer wrote:
> On Monday, 18 August 2014 21:16:26 UTC+1, Terry Reedy wrote:
>> On 8/18/2014 3:16 PM, Alex Willmer wrote:
>> > A challenge, just for fun. Can you speed up this function?
>>
>> You should give a specification here, with examples. You should perhaps
>
> Sorry, the (informal)
On Tue, Aug 19, 2014 at 5:16 AM, Alex Willmer wrote:
> Back story:
> Last week we needed a custom encoding to store unicode usernames in a config
> file that only allowed mixed case ascii, digits, underscore, dash, at-sign
> and plus sign. We also wanted to keeping the encoded usernames somewhat
On Mon, Aug 18, 2014 at 2:42 PM, Ethan Furman wrote:
> If you are not dealing with singletons (which is most cases), such as
> numbers, strings, lists, and most other arbitrary objects, you will need to
> use "!=" or anytime the two objects you are comparing are not the exact
> same object, you c
Grant Edwards writes:
> I agree with the comments that the appellation for "simply the next
> version after 3.9" should be 3.10 and not 4.0. Everybody I know
> considers SW versions numbers to be dot-separated tuples, not floating
> point numbers.
This consensus is sometimes termed “semantic ver
On 08/18/2014 03:04 PM, Chris Kaynor wrote:
On Mon, Aug 18, 2014 at 2:42 PM, Ethan Furman wrote:
If you are not dealing with singletons (which is most cases), such as numbers,
strings, lists, and most other
arbitrary objects, you will need to use "!=" or anytime the two objects you are
compar
On 8/18/2014 2:09 PM, Grant Edwards wrote:
On 2014-08-18, Ethan Furman wrote:
On 08/18/2014 07:51 AM, Grant Edwards wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when the
second value is "0", you avoid it u
On Mon, Aug 18, 2014 at 10:18 AM, Chiu Hsiang Hsu wrote:
> I know that Python use Timsort as default sorting algorithm and it is
> efficient,
> but I just wanna have a partial sorting (n-largest/smallest elements).
Perhaps heapq with Pypy? Or with nuitka? Or with numba?
--
https://mail.python
On 08/18/2014 01:58 PM, ElChino wrote:
"Marko Rauhamaa" wrote:
In almost all cases, both tests would result in the same behavior.
However, the "is not" test is conceptually the correct one since you
want to know if x is the one and only None object. You don't want to be
fooled by an imposter o
On Monday, 18 August 2014 21:16:26 UTC+1, Terry Reedy wrote:
> On 8/18/2014 3:16 PM, Alex Willmer wrote:
> > A challenge, just for fun. Can you speed up this function?
>
> You should give a specification here, with examples. You should perhaps
Sorry, the (informal) spec was further down.
> > a
On 2014-08-18, Ian Kelly wrote:
> By working with dates far enough in the past that the modern time zone
> rules don't apply. Some experimentation determines that the timedelta
> between Shanghai and Urumqi goes from 136 minutes to 120 minutes in
> 1928, and then from 120 minutes to 0 minutes in
On 2014-08-18, Ethan Furman wrote:
> On 08/18/2014 07:51 AM, Grant Edwards wrote:
>>
>> To all of us out here in user-land a change in the first value in the
>> version tuple means breakage and incompatibilities. And when the
>> second value is "0", you avoid it until some other sucker has found
>
"Marko Rauhamaa" wrote:
In almost all cases, both tests would result in the same behavior.
However, the "is not" test is conceptually the correct one since you
want to know if x is the one and only None object. You don't want to be
fooled by an imposter object that simply looks like the None ob
"ElChino" :
> A newbie question to you; what is the difference between statements
> like:
> if x is not None:
> and
> if x != None:
Do the following: take two $10 bills. Hold one bill in the left hand,
hold the other bill in the right hand.
Now, the bill in the left hand "is not" the bill in th
On 2014-08-18 21:35, ElChino wrote:
A newbie question to you; what is the difference between statements
like:
if x is not None:
and
if x != None:
Without any context, which one should be preferred?
IMHO, the latter is more readable.
"x == y" tells you whether x and y refer to objects that
A newbie question to you; what is the difference between statements
like:
if x is not None:
and
if x != None:
Without any context, which one should be preferred?
IMHO, the latter is more readable.
--
https://mail.python.org/mailman/listinfo/python-list
Joel Goldstick writes:
> Local Mean Time is time based on the actually astronomical position
> of the sun. It is defined as 12 noon when the sun is at its high
> point, directly south in the sky. This is the time you get when you
> read a sundial!
a sundial measures the Apparent Time, where th
On 8/18/2014 3:16 PM, Alex Willmer wrote:
A challenge, just for fun. Can you speed up this function?
You should give a specification here, with examples. You should perhaps
be using .maketrans and .translate.
import string
charset = set(string.ascii_letters + string.digits + '@_-')
byteseq
Cristian you are right, never experienced visual regexp, is incredible.
I created pyMatch to help me in the automation scripts and text formatting, so
I decided to work from the command line.
You're right, you can also do this with sed, but sed has a small defect "in my
view", you will be able
Ian Kelly writes:
> Some experimentation determines that the timedelta between Shanghai
> and Urumqi
Urumqi is on the way for the level of popularity that Piraeus enjoyed
in the good ol'days
--
per crimini come l'umanita'.
MMAX, in IPI+IHC
--
A challenge, just for fun. Can you speed up this function?
import string
charset = set(string.ascii_letters + string.digits + '@_-')
byteseq = [chr(i) for i in xrange(256)]
bytemap = {byte: byte if byte in charset else '+' + byte.encode('hex')
for byte in byteseq}
def plus_encode(s):
On Mon, Aug 18, 2014 at 1:49 PM, Lele Gaifax wrote:
> Even if I know this is not the right forum and I should (and I
> eventually do, assuming a positive feedback) instead open a ticket and
> attach the patch there, I'd like to hear opinions on whether this should
> be enabled by default, and poss
On 18 August 2014 20:03 "Ian Kelly" wrote:
> I also don't know why pytz shows the LMT offset in the repr for those
> timezones instead of the current UTC offset.
If pytz objects do not have a datetime object attached, they default to the
first ever entry, which is usually LMT. This can be problem
Steven D'Aprano writes:
> On Mon, 21 Jul 2014 17:57:22 +0200, Lele Gaifax wrote:
>> Granted, the readline library exposes a "operate-and-get-next" function,
>> by default bound to \C-o...
>
> Have you actually got that working in Python with the readline module?
> I've tried and tried and cannot
On Mon, Aug 18, 2014 at 11:18 AM, Chiu Hsiang Hsu wrote:
> I know that Python use Timsort as default sorting algorithm and it is
> efficient,
> but I just wanna have a partial sorting (n-largest/smallest elements).
>
> In the current state, I can only find this kind of functions from heapq,
> but
On Mon, Aug 18, 2014 at 11:53 AM, Ian Kelly wrote:
> On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote:
>>
>> I found that it is a concept LMT local mean time can express my meaning.
>>
>> import pytz,datetime
>> tz1 = pytz.timezone('Asia/Shanghai')
>> tz1
>>
>> >>> str(tz1)
>> 'Asia/Shanghai'
>>
On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote:
>
> I found that it is a concept LMT local mean time can express my meaning.
>
> import pytz,datetime
> tz1 = pytz.timezone('Asia/Shanghai')
> tz1
>
> >>> str(tz1)
> 'Asia/Shanghai'
>
> tz2 = pytz.timezone('Asia/Urumqi')
> tz2
>
>
> the time diffe
Am 18.08.14 18:51, schrieb Jamie Mitchell:
On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote:
So I have two 1D arrays:
1st array - ([8, 8.8,8.5,7.9,8.6 ...], dtype=float32)
It has a shape (150,)
2nd array - ([2, 2.2, 2.5, 2.3, ...],dtype=float32)
It has a shape (150,)
What I
Am 18.08.14 14:21, schrieb Rafael Francischini:
Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer
escreveu:
I expected something like visual regexp:
http://laurent.riesterer.free.fr/regexp/
Since RegExp-Syntax is very similar across tools, yours is almost
Il giorno lunedì 18 agosto 2014 19:13:08 UTC+2, Chris Kaynor ha scritto:
> On Mon, Aug 18, 2014 at 10:00 AM, Beppe wrote:
>
>
> hi to everybody,
>
> in the following scrip I try to call the function read_parameters () but
> returns me that wants two arguments!?!?!
>
> My intent is to have in
I know that Python use Timsort as default sorting algorithm and it is efficient,
but I just wanna have a partial sorting (n-largest/smallest elements).
In the current state, I can only find this kind of functions from heapq,
but it's too slow for this problem,
the pure c sorted function can easily
On Monday, August 18, 2014 10:25:15 PM UTC+5:30, Jamie Mitchell wrote:
> I forgot to mention that when I try:
> a=np.array([[hs_con_sw],[te_con_sw]])
> I get a 3D shape for some reason - (2,1,150) which is not what I'm after.
I guess you want
a=np.array([hs_con_sw,te_con_sw])
??
--
https://ma
On 08/18/2014 10:00 AM, ElChino wrote:
"Grant Edwards" wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when the
second value is "0", you avoid it until some other sucker has found
the bugs and a few more minor
On 2014-08-18 16:34, Furqan wasi wrote:
Hi ,
Could you help me out on this , or guide me to some how can thanks
I am trying to get a wav file information but Sndfile is unable to read
file with special characters in path and file name(查找問題daw.wav) and
i am unable to get information in any way ,
On 08/18/2014 07:51 AM, Grant Edwards wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when the
second value is "0", you avoid it until some other sucker has found
the bugs and a few more minor releases have come
On Mon, Aug 18, 2014 at 10:00 AM, Beppe wrote:
> hi to everybody,
> in the following scrip I try to call the function read_parameters () but
> returns me that wants two arguments!?!?!
> My intent is to have in the class, Engine (), some static attributes that
> can be used by other instances wit
"Grant Edwards" wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when the
second value is "0", you avoid it until some other sucker has found
the bugs and a few more minor releases have come out.
"Three shall
hi to everybody,
in the following scrip I try to call the function read_parameters () but
returns me that wants two arguments!?!?!
My intent is to have in the class, Engine (), some static attributes that can
be used by other instances without to redefine this every time.
These matters could be
I forgot to mention that when I try:
a=np.array([[hs_con_sw],[te_con_sw]])
I get a 3D shape for some reason - (2,1,150) which is not what I'm after.
Thanks,
Jamie
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote:
> Jamie Mitchell wrote:
>
>
>
> > I created the 2D array which read as:
>
>
>
> That's not a 2D array.
>
>
>
> When the amount of data you have is too big to clearly see what it
>
> happening, replace it with something sm
On Sun, Aug 17, 2014 at 8:15 AM, Chris Angelico wrote:
> In a class definition, you have explicit state parameters on your
> functions - 'self':
>
> class C:
> def foo(self, arg):
> # blah blah
>
> At module level, there's equivalent state - the function "knows" what
> module it came
Hi ,
Could you help me out on this , or guide me to some how can thanks
I am trying to get a wav file information but Sndfile is unable to read
file with special characters in path and file name(查找問題daw.wav) and i am
unable to get information in any way , i tried passing file path to Sndfile
wit
On Monday, August 18, 2014 7:21:53 PM UTC+5:30, Joel Goldstick wrote:
> On Mon, Aug 18, 2014 at 9:12 AM, luofeiyu wrote:
> > I found that it is a concept LMT local mean time can express my meaning.
> Local Mean Time is time based on the actually astronomical position of
> the sun. It is defined
On 2014-08-17, Stefan Behnel wrote:
> Steven D'Aprano schrieb am 17.08.2014 um 16:21:
>> I wonder whether Ruby programmers are as obsessive about
>> Ruby's GIL?
>
> I actually wonder more whether Python programmers are really all that
> obsessive about CPython's GIL.
[...]
> Personally, I like t
On Tue, Aug 19, 2014 at 12:51 AM, Grant Edwards wrote:
> I agree with the comments that the appellation for "simply the next
> version after 3.9" should be 3.10 and not 4.0. Everybody I know
> considers SW versions numbers to be dot-separated tuples, not
> floating point numbers.
>
Agreed. Howev
On 2014-08-17, Mark Lawrence wrote:
> A blog from Nick Coghlan
> http://www.curiousefficiency.org/posts/2014/08/python-4000.html that
> should help put a few minds to rest.
I agree with the comments that the appellation for "simply the next
version after 3.9" should be 3.10 and not 4.0. Everyb
On Mon, 18 Aug 2014 12:55:59 +0800, luofeiyu wrote:
> http://www.thefreedictionary.com/time+zone
>
> time zone Any of the 24 divisions of the Earth's surface used to
> determine the local time for any given locality.
> Each zone is roughly 15° of longitude in width, with local variations
> for ec
On 2014-08-16, Terry Reedy wrote:
> On 8/15/2014 11:04 PM, Russell E. Owen wrote:
>> We are using the syslog module for logging, and would like to redirect
>> stderr to our log. Is there a practical way to do it?
>
> You can replace sys.stderr with any object with a .write(s) method.
Just a remen
On Mon, Aug 18, 2014 at 9:12 AM, luofeiyu wrote:
> I found that it is a concept LMT local mean time can express my meaning.
Local Mean Time is time based on the actually astronomical position of
the sun. It is defined as 12 noon when the sun is at its high point,
directly south in the sky. This
On Mon, Aug 18, 2014 at 11:30 PM, Everything You Need To Know
wrote:
> You are correct in suggesting that the current course is Windows Specific,
> though as far as I currently understand it only effects conditional imports
> such as time.clock() into time.time(). Which is a great warning to add
On Monday, 18 August 2014 22:23:43 UTC+9:30, Chris Angelico wrote:
> On Mon, Aug 18, 2014 at 10:44 PM, Everything You Need To Know
>
> wrote:
>
> >> [
>
> >> I sincerely hope you're not teaching people to install Python 3.0! But
>
> >>
>
> >> what _is_ the minimum expected version for this c
|I found that it is a concept LMT local mean time can express my meaning.
import pytz,datetime
tz1 = pytz.timezone('Asia/Shanghai')
tz1
str(tz1)
'Asia/Shanghai'
|
||tz2 = pytz.timezone('Asia/Urumqi')|
tz2
the time difference between shanghai and Urumqi is about 2 hours in the form of
LMT.
On Mon, Aug 18, 2014 at 10:44 PM, Everything You Need To Know
wrote:
>> [
>> I sincerely hope you're not teaching people to install Python 3.0! But
>>
>> what _is_ the minimum expected version for this course? And what
>>
>> platforms do you support?
>
> Sorry, I have tried to refer to version of
> [
> I sincerely hope you're not teaching people to install Python 3.0! But
>
> what _is_ the minimum expected version for this course? And what
>
> platforms do you support?
Sorry, I have tried to refer to version of #3.0+ meaning most current version,
though I wanted to make it clear we are
Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer
escreveu:
> Am 14.08.14 21:50, schrieb rafinha.u...@gmail.com:
>
> > Hello, I created this tool to help me develop on formatting text using
> > regular expressions.
>
> > Any questions, I am available.
>
> > Thank yo
You are trying to write the open file (file1) in the file type.
I think that you wanted to write in file1, the data:
file1.write(file_data) # instead of file.write(file1)
2014-08-18 11:41 GMT+02:00 ngangsia akumbo :
> error
>
> yems ~ # nano testfile1
> yems ~ # python testfile1
> Enter fil
Jamie Mitchell writes:
> I created the 2D array which read as:
Maybe you could try numpy.reshape() on your 1D array?
--
https://mail.python.org/mailman/listinfo/python-list
Thanks guys
--
https://mail.python.org/mailman/listinfo/python-list
ngangsia akumbo wrote:
> error
>
> yems ~ # nano testfile1
> yems ~ # python testfile1
> Enter file name: g
> write in data: g
> Traceback (most recent call last):
> File "testfile1", line 11, in
> file.write(file1)
> TypeError: function takes exactly 1 argument (0 given)
>
>
>
> impo
The line should be:
file1.write(file_data)
you could write
file.write(file1, file_data)
but that would be an odd way to do it :)
On 18 August 2014 10:41, ngangsia akumbo wrote:
> error
>
> yems ~ # nano testfile1
> yems ~ # python testfile1
> Enter file name: g
> write in data: g
> Tracebac
error
yems ~ # nano testfile1
yems ~ # python testfile1
Enter file name: g
write in data: g
Traceback (most recent call last):
File "testfile1", line 11, in
file.write(file1)
TypeError: function takes exactly 1 argument (0 given)
import os.path
save_here = '/home/yems/newfile/'
file_n
On 18 August 2014 04:28 "luofeiyu" wrote:
>
> The land area of China is 60-degree longitude from west to east.
According to the demarcation of the world time zoning standard,
> the land area of China lies between the eastern fifth to ninth time
zones, there are 5 time zones in china in fact.
> Cur
On Mon, Aug 18, 2014 at 5:31 PM, Everything You Need To Know
wrote:
> Python 0.0 - Downloading and installing
> Running Time: 1:47
>
> Eyn2k about downloading and installing Python 3.0 + to get started scripting
> in Python. You may want to use another Python Text
VIDEO PYTHON COURSE - 33 Videos and growing rapidly.
Emphasis is on trying to make programming free and fun! Grow your own fun
programs like the Mandelbrot set and John Conways Game of Life.
See here for link to Channel:
https://www.youtube.com/channel/UCad91ea17ynqc0cTokBG3bg
This is a complete
On Mon, 18 Aug 2014 00:43:58 -0400, Terry Reedy wrote:
> >>> timeit.repeat('1+1')
> [0.04067762117549266, 0.019206152658126363, 0.018796680446902643]
I think you have been tripped up by the keyhole optimizer. I'm not
entirely certain, but that's probably just measuring the overhead of
evaluati
79 matches
Mail list logo