On 10/5/17, Steve D'Aprano wrote:
> The A and E in the word "are" are not vowels, since they are silent.
Interesting! :)
Is then R (half?) silent in word "Brazil"?
--
https://mail.python.org/mailman/listinfo/python-list
On 10/5/17, Chris Angelico wrote:
> On Thu, Oct 5, 2017 at 12:24 PM, Stefan Ram wrote:
>> One might wish to implement a small language with these commands:
>>
>> F - move forward
>> B - move backward
>> L - larger stepsize
>> S - smaller stepsize
>>
>> . One could start with the following pse
On 9/29/17, Rob Gaddi wrote:
> On 09/29/2017 10:54 AM, Stefan Ram wrote:
>>In some languages, printing »'\n'«, the Unicode code point 10,
>>will have the effect of printing a line terminator, which might
>>mean that the output device actually receives »\r\n«.
>>
>>The line terminat
On 9/23/17, Stephan Houben wrote:
> Op 2017-09-22, Pavol Lisy schreef :
>> On 9/19/17, leam hall wrote:
>>> I'm working on designing the classes, sub-classes, and relationships in
>>> my
>>> code. What is a good visual way to represent it so it can be sto
On 9/22/17, Peter Otten <__pete...@web.de> wrote:
> Exposito, Pedro (RIS-MDW) wrote:
>
>> This code does a "where" clause on a panda data frame...
>>
>> Code:
>> import pandas as pd;
>> col_names = ['Name', 'Age', 'Weight', "Education"];
>> # create panda dataframe
>> x = pd.read_csv('test.dat', se
On 9/19/17, leam hall wrote:
> I'm working on designing the classes, sub-classes, and relationships in my
> code. What is a good visual way to represent it so it can be stored in git
> and shared on the list without large images or attachments?
>
> Thanks!
>
> Leam
https://stackoverflow.com/quest
On 9/21/17, Peter Otten <__pete...@web.de> wrote:
> zljubi...@gmail.com wrote:
>
>> I have sliced the pandas dataframe
>>
>> end_date = df[-1:]['end']
>>
>> type(end_date)
>> Out[4]: pandas.core.series.Series
>>
>> end_date
>> Out[3]:
>> 48173 2017-09-20 04:47:59
>> Name: end, dtype: datetime64[n
On 9/21/17, Steve D'Aprano wrote:
> In the iPython interactive interpreter, obj? prints information about the
> given
> object. For example:
>
>
> In [11]: None?
> Type: NoneType
> Base Class:
> String Form:None
> Namespace: Python builtin
> Docstring:
>
>
> Does anyone know that the Nam
On 9/20/17, Steve D'Aprano wrote:
> On Wed, 20 Sep 2017 02:55 pm, Pavol Lisy wrote:
Thanks Steve, I agree with most of your mail and really appreciate
interesting reading! :)
> (a) "you save one character (two keystrokes)"; and
First I have to admit that I forgot space!
On 9/19/17, Steve D'Aprano wrote:
[...]
> The point is, we all make the occasional silly error. Doesn't mean we should
> cripple our functions and fill the language with special cases like the
> print
> statement to avoid such rare errors. If print had always been a function,
> and
> someone sug
On 9/11/17, Thomas Jollans wrote:
> On 2017-09-10 09:05, INADA Naoki wrote:
>> I saw encouraging tweet from Kenneth Reitz.
>>
>> https://twitter.com/kennethreitz/status/902028601893294081/photo/1
>>
>> On Heroku, most people choose Python 3!
>> I know, it's because Python 3 is the default Python o
Interesting reading:
https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1
--
https://mail.python.org/mailman/listinfo/python-list
On 9/8/17, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> A harder question is, what if you take a random number from the Integers?
>> How
>> many digits will it have in (say) base 10? I don't have a good answer to
>> that.
>> I think it may be ill-defined.
>
> I think the answer is that on avera
On 9/3/17, Steve D'Aprano wrote:
> On Sun, 3 Sep 2017 05:17 pm, Stephan Houben wrote:
>
>> Generally speaking, the more you learn about case normalization,
>> the more attractive case sensitivity looks
>
> Just because something is hard doesn't mean its not worth doing.
>
> And just because you ca
On 9/2/17 at 4:21, Steve D'Aprano wrote:
> If regular case-sensitive string comparisons don't support the locale, why
> should case-insensitive comparisons be required to?
I think that Chris answered very good before:
On 9/2/17 at 2:53 AM, Chris Angelico wrote:
> On Sat, Sep 2, 2017 at 10:31 AM
On 9/2/17, eryk sun wrote:
> On Fri, Sep 1, 2017 at 3:23 AM, Peter Otten <__pete...@web.de> wrote:
>>
>> I think you have to specify the types yourself:
>>
> import ctypes
> libm = ctypes.cdll.LoadLibrary("libm.so")
> libm.sqrt(42)
>> 0
> libm.sqrt.argtypes = [ctypes.c_double]
On 8/31/17, 20/20 Lab wrote:
>
>
> On 08/31/2017 01:53 AM, Pavol Lisy wrote:
[...]
> Valid point, fired up a windows 10 machine and worked as well.
>
> Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit
> (Intel)] on win32
> Type "copyright",
On 8/31/17, Steve D'Aprano wrote:
>> Additionally: a proper "case insensitive comparison" should almost
>> certainly start with a Unicode normalization. But should it be NFC/NFD
>> or NFKC/NFKD? IMO that's a good reason to leave it in the hands of the
>> application.
>
> Normalisation is orthogo
On 8/31/17, Terry Reedy wrote:
> On 8/30/2017 1:35 PM, Terry Reedy wrote:
>> https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number
>>
>>
>>
>> reports the following:
>> -
>> Microsoft Windows [Version 10.0.16251.1002]
>> (c) 2017 Microsoft Co
On 8/28/17, Leam Hall wrote:
> On 08/28/2017 11:40 AM, Dennis Lee Bieber wrote:
>
> ... a bunch of good stuff ...
>
> I'm (re-)learning python and just trying make sure my function works.
> Not at the statistical or cryptographic level. :)
>
> Thanks!
>
> Leam
> --
> https://mail.python.org/mail
On 8/28/17, Steven D'Aprano wrote:
> In Python 3, what's the difference between these two classes?
> # implicitly inherit from object
> class Spam:
> ...
>
> # explicitly inherit from object
> class Spam(object):
> ...
>
> If you sense a trick question, you're right :-)
>
object = int #
On 8/21/17, Chris Angelico wrote:
> On Mon, Aug 21, 2017 at 12:19 PM, MRAB wrote:
>> On 2017-08-21 03:00, Steve D'Aprano wrote:
>>>
>>> On Fri, 18 Aug 2017 04:55 pm, Marko Rauhamaa wrote:
>>>
Is a Python implementation
allowed to parallelize or otherwise reorder the evaluation loop?
>>>
On 8/21/17, zach.sm...@orthofi.com wrote:
> I wouldn't say I'm a Python noob, but I wouldn't say I'm a Python expert
> either. I work in data science and use Pandas Dataframes a lot. My question
> is regarding the difference in calling out a specific row, column
> combination in a dataframe.
>
> I
On 8/17/17, Marko Rauhamaa wrote:
> Pavol Lisy :
>
>> On 8/17/17, Gregory Ewing wrote:
>>> I don't agree that the word "for" necessarily implies proceduralness.
>>
>> With this logic (I humbly think that) word "while" neither
>>
On 8/17/17, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> If he wanted declarative semantics, why didn't he argue for declarative
>> syntax
>> like "select...where", instead of choosing procedural syntax which matches
>> the
>> actual procedural semantics given?
>
> I don't agree that the word "
On 8/16/17, Steve D'Aprano wrote:
> Over in another thread, we've been talking about comprehensions and their
> similarities and differences from the functional map() operation.
>
> Reminder:
>
> map(chr, [65, 66, 67, 68])
>
> will return ['A', 'B', 'C'].
>
> My questions for those who know langua
On 7/28/17, Steve D'Aprano wrote:
> On Fri, 28 Jul 2017 05:52 pm, Ethan Furman wrote:
>
>> class X(Enum):
>> Falsey = 0
>> Truthy = 1
>> Fakey = 2
>> def __bool__(self):
>> return bool(self.value)
>
> Thanks Ethan.
BTW bool at enum seems to be expensive:
%timeit 7 if
On 7/14/17, Steve D'Aprano wrote:
> On Fri, 14 Jul 2017 09:06 am, Ned Batchelder wrote:
>
>> Steve's summary is qualitatively right, but a little off on the
>> quantitative
>> details. Lists don't resize to 2*N, they resize to ~1.125*N:
>>
>> new_allocated = (size_t)newsize + (newsize >> 3) +
On 7/13/17, Steve D'Aprano wrote:
> On Fri, 14 Jul 2017 12:59 am, Pavol Lisy wrote:
>
>> On 7/13/17, Steve D'Aprano wrote:
>>
>>> [1] Actually, CPython's lists initially quadruple the size of the array,
>>> up
>>> to a
>>> cert
On 7/13/17, Steve D'Aprano wrote:
> [1] Actually, CPython's lists initially quadruple the size of the array, up
> to a
> certain point, and then switch to doubling. This ensures that small lists
> have
> even fewer expensive resizes, at the cost of wasting a bit more memory, but
> its
> only a sm
On 7/10/17, Nigel Palmer wrote:
> Hi
>
> I am trying to compile Python 3.6.1 on macOS 10.12.5 with xcode 8.8.3 using
> the instructions at
> https://docs.python.org/devguide/setup.html#build-dependencies but I am
> getting the error
>
> ./python.exe -E -S -m sysconfig --generate-posix-vars ;\
>
On 7/11/17, Steven D'Aprano wrote:
> I have a colleague who is allergic to mutating data structures. Yeah, I
> know, he needs to just HTFU but I thought I'd humour him.
>
> Suppose I have an iterator that yields named tuples:
>
> Parrot(colour='blue', species='Norwegian', status='tired and shagged
It seems to be:
http://pythonhosted.org/ezdxf/entities.html?highlight=spline#Spline
->
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-Core/files/GUID-58316136-30EB-499C-ACAD-31D0C653B2B2-htm.html
->
https://en.wikipedia.org/wiki/Non-unifo
On 7/7/17, Steve D'Aprano wrote:
> import sys
> if sys.version_info >= (3,): # the comma is important
> print("version 3")
But be careful inside script! It could live long enough to see python4 :)
--
https://mail.python.org/mailman/listinfo/python-list
On 7/5/17, Binary Boy wrote:
> On Wed, 05 Jul 2017 20:37:38 +0300, Jussi Piitulainen wrote:
>> Sam Chats writes:
>>
>> > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote:
>> >> On 2017-07-05, Sam Chats wrote:
>> >>
>> >> > I want to write, say, 'hello\tworld' as-is to a file
On 7/1/17, Ho Yeung Lee wrote:
> just want to compare tuples like index (0,1), (0,2), (1,2) without
> duplicate
> such as (2,0), (1,0) etc
>
>
> On Saturday, July 1, 2017 at 7:00:17 PM UTC+8, Peter Otten wrote:
>> Ho Yeung Lee wrote:
>>
>> > finally i searched dict.values()[index] solved this
>>
On 7/1/17, Thomas Jollans wrote:
> On 30/06/17 13:32, Pavol Lisy wrote:
>> [snip]
>>
>> python 3.6.1 works as I expected
>>
>>>>> import logging as operator
>>>>> from operator import _compare_digest as compare_digest
>> Traceback (m
On 6/28/17, Xristos Xristoou wrote:
> i dont have 'operator.py' in my system only 'test_operator.py' and
> 'fix_operator.py'
>
> if :
> import sys
> print sys.modules['operator']
>
> i get this :
>
> that say me
>
> how to rename it?
> --
> https://mail.python.org/mailman/listinfo/python-l
(I am not very familiar with panda too!)
In case of his data he needs to set unit to 's'
df['dt'] = pd.to_datetime(df.epoch,unit='s')
It return utc time from epoch, so maybe this is what he could use ->
df['dt'] = df.epoch.apply(time.ctime)
or something like (if he needs strings) ->
df['dt']
$ python3 -m ensurepip
/usr/bin/python3: No module named ensurepip
But maybe this help to understand:
$ python -m ensurepip
ensurepip is disabled in Debian/Ubuntu for the system python.
Python modules For the system python are usually handled by dpkg and apt-get.
apt-get install python-
In
If I understand well then you like to have simple quick solution
without need to learn much.
And that you don't need to support big traffic...
Maybe cherrypy ( http://cherrypy.org/ ) is what you like to look at.
Probably this is good enough on your ubuntu:
sudo apt-get install python3-cherr
On 5/31/17, Jon Ribbens wrote:
> On 2017-05-31, Pavol Lisy wrote:
>> But althoug return from execute is undefined (
>> https://www.python.org/dev/peps/pep-0249/#id16 ), you could iterate
>> over cursor ( https://www.python.org/dev/peps/pep-0249/#iter )
>
> ... which i
On 5/31/17, Peter Otten <__pete...@web.de> wrote:
> Jon Ribbens wrote:
>
>> On 2017-05-31, Skip Montanaro wrote:
>>> I'm kind of stuck with the database API I have. ("Love the child you
>>> have, not the one you wish you had?") Given that I have the choice to
>>> execute those three statements to
On 5/31/17, Dennis Lee Bieber wrote:
> On Tue, 30 May 2017 19:27:48 + (UTC), Mahmood Naderan via Python-list
> declaimed the following:
>
>># trying /usr/lib/python2.6/site-packages/openpyxl.so
>># trying /usr/lib/python2.6/site-packages/openpyxlmodule.so
>># trying /usr/lib/python2.6/site-pa
What is output from
$ pip ---version
$ easy_install --version
?
Maybe you have two pythons and only one pip?
$ find /opt -name python
$ find /usr -name python
$ find /opt -name pip
$ find /usr -name pip
On 5/30/17, Mahmood Naderan via Python-list wrote:
> Well yes. It looks in other folders
On 5/15/17, Chris Angelico wrote:
> Perhaps a future version of gcc will be implemented in Python. Would
> you then say that Python is beholden to no one? You would still need
> to have a C compiler installed in order to compile extension modules.
> It's too big to include with every single Pytho
On 5/14/17, Pavol Lisy wrote:
> On 5/14/17, Charles T. Smith wrote:
>> I'm stumped by this:
>
>> $ PYTHONPATH= python except
>> Traceback (most recent call last):
>> File "except", line 7, in
>> except getopt.error, msg:
>>
On 5/14/17, Charles T. Smith wrote:
> I'm stumped by this:
> $ PYTHONPATH= python except
> Traceback (most recent call last):
> File "except", line 7, in
> except getopt.error, msg:
> AttributeError: 'module' object has no attribute 'error'
>
>
> The program is:
>
> $ cat except
> #!/usr
On 5/11/17, Peter Otten <__pete...@web.de> wrote:
> Mahmood Naderan via Python-list wrote:
>
>> Excuse me, I changed
>>
>> csv.writer(outstream)
>>
>> to
>>
>> csv.writer(outstream, delimiter =' ')
>>
>>
>> It puts space between cells and omits "" around some content.
>
> If your data doesn't conta
On 5/11/17, Grant Edwards wrote:
> On Wed, May 10, 2017 at 05:14:22PM -0700, somebody wrote:
>> I have downloaded Anaconda to Cinnamon Mint 18.1 64 bit where Python
>> 3.6 exists.
>>
>> It will not start up.
>
> The anaconda that I know about is the RedHat installer program (which
> was original
On 5/10/17, Grant Edwards wrote:
> On 2017-05-10, RRS1 via Python-list wrote:
>
>> I am very new to Python, have only done simple things >>>print("hello
>> world") type things. I've really been looking forward to using Python. I
>> bought Two books, downloaded Python 3.6.1 (32 & 64) and eac
On 3/30/17, INADA Naoki wrote:
> Maybe, this commit make this regression.
>
> https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6
>
> Old:
> minused = (so->used + other->used)*2 (L619)
>
> New:
> minused = so->used + other->used (L620)
> minused = (minused > 5)
On 3/29/17, Jan Gosmann wrote:
> On 28 Mar 2017, at 14:21, INADA Naoki wrote:
>
>> On Wed, Mar 29, 2017 at 12:29 AM, Jan Gosmann
>> wrote:
>>
>> I suppose smaller and faster benchmark is better to others looking for
>> it.
>> I already stopped the azure instance.
>> [...]
>> There are no maxrss d
On 3/28/17, zljubi...@gmail.com wrote:
> In dataframe
>
> import pandas as pd
>
> data = {'model': ['first', 'first', 'second', 'second', 'second', 'third',
> 'third'],
> 'dtime': ['2017-01-01_112233', '2017-01-01_112234',
> '2017-01-01_112234', '2017-01-01_112234', '2017-01-01_112234',
>
On 3/21/17, Kev Dwyer wrote:
> Robin Becker wrote:
>
>> Is there a way to get the same sequences of random numbers in python 2.7
>> and python >= 3.3?
>>
>> I notice that this simple script produces different values in python 2.7
>> and >=3.3
>>
>> C:\code\hg-repos\reportlab>cat s.py
>> import sys
On 3/19/17, Chris Angelico wrote:
> On Sun, Mar 19, 2017 at 4:53 PM, Pavol Lisy wrote:
>> In case of spaces there is not discrepancy. pep8 and similar linters
>> could work fine without incompatible configurations.
> I don't like the pep8 tool; its name implies far m
On 3/19/17, Pavol Lisy wrote:
> On 3/18/17, Nathan Ernst wrote:
> PS. I am "spacist" :P but I feel this a little more aggressive than is
> necessary too:
>
>> Feel free to start your own discussion forum for your new programming
>> language that forbids spa
On 3/18/17, Nathan Ernst wrote:
> My issue with using spaces instead of tabs, is that, as mentioned earlier
> in the thread, everyone has their own preferences on indentation. I've
> worked on teams where different developers used 2, 3 & 4 spaces as
> indentation. Obviously, if you're using spaces
On 2/28/17, Jim wrote:
simplified:
> from xdo import Xdo
> xdo = Xdo()
> win = xdo.search_windows(winname = 'Mozilla Firefox')
> File "/home/jfb/EVs/env/lib/python3.5/site-packages/xdo/__init__.py"
> TypeError: bytes or integer address expected instead of str instance
Example on github seems to
On 2/27/17, Andrew Zyman wrote:
> Hello,
> i'm trying to understand what is the difference between the below code.
> And how do i access the column's data without hardcoding the column name in
> such a way that i'll be able to convert it's values into the list of
> strings?
>
> I appreciate your
On 2/24/17, Pablo Lozano wrote:
> Good day,
>
> I installed the Spyder 3.6 IDE from the Anaconda package and at the start k
> to the IDE I get the Spyder Update saying Spyder 3.1.3 is available. Did it
> incorrectly install Anaconda? As far as I know Spyder 3.1.3 is rather old
> and the latest i
On 2/23/17, Peter Otten <__pete...@web.de> wrote:
> Peter Otten wrote:
>
>> Functions to the rescue:
>
> On second thought this was still more code than necessary.
If we are talking about less code than necessary then probably we
could use something from python's ecosystem...
>>> import pandas as
On 2/22/17, Steve D'Aprano wrote:
> On Wed, 22 Feb 2017 08:47 pm, Cecil Westerhof wrote:
>
>> On Wednesday 22 Feb 2017 08:49 CET, Argentinian Black ops lll wrote:
>>
>>> *** SOLVED ***
>>
>> It would be nice if you shared the solution.
>
> I believe Cameron's post contains the bones of a solution.
On 2/21/17, Deborah Swanson wrote:
> Chris Angelico wrote, on February 21, 2017 7:30 AM
>>
>> On Wed, Feb 22, 2017 at 2:16 AM, Deborah Swanson
>> wrote:
>> > Really? We used software called Powershell a couple decades ago in
>> > the 90s, as an improvement on the DOS box. I didn't like it much a
On 2/15/17, spiess.benjamin--- via Python-list wrote:
> Hello !:)
> I've got a problem which I would really like to solve.
> I got a cloud of points (in the simplest example its a 2-dimensional cloud
> of points).
> First, I want to set one of the points as the initial (or middle) point.
> Startin
On 2/7/17, Steven D'Aprano wrote:
> On Mon, 06 Feb 2017 17:00:25 -0800, accessnewbie wrote:
[...]
>> But when I try to bold, it bombs. It does not seem to like either of
>> these (+ myText + "") (separately or together) appended on the
>> end.
>
> How are you trying to bold? If you're programming
On 2/6/17, Chris Angelico wrote:
> On Mon, Feb 6, 2017 at 1:19 PM, Steve D'Aprano
> wrote:
[...]
>> How about graphic and video designers? Just how well does hg cope with
>> gigabytes of video data?
>
> I've no idea, but I know that git can handle large amounts of data.
> (There are a couple of
67 matches
Mail list logo