ANN: eGenix mxODBC Connect - Python Database Interface 2.0.2

2012-12-14 Thread eGenix Team: M.-A. Lemburg


ANNOUNCING
  eGenix.com mxODBC Connect

  Python Database Interface

Version 2.0.2


 mxODBC Connect is our commercially supported client-server product for
   connecting Python applications to relational databases
in a truly cross-platform way.


This announcement is also available on our web-site for online reading:
http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.0.2-GA.html



INTRODUCTION

The mxODBC Connect Database Interface for Python allows users to
easily connect Python applications to all major databases on the
market today in a highly portable, convenient and secure way.

Python Database Connectivity the Easy Way
-

Unlike our mxODBC Python extension, mxODBC Connect is designed as
client-server application, so you no longer need to find production
quality ODBC drivers for all the platforms you target with your Python
application.

Instead you use an easy to install royalty-free Python client library
which connects directly to the mxODBC Connect database server over the
network.

This makes mxODBC Connect a great basis for writing cross-platform
multi-tier database applications and utilities in Python, especially
if you run applications that need to communicate with databases such
as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix,
Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many
more, that run on Windows or Linux machines.

Ideal for Database Driven Client Applications
-

By removing the need to install and configure ODBC drivers on the
client side and dealing with complicated network setups for each set
of drivers, mxODBC Connect greatly simplifies deployment of database
driven client applications, while at the same time making the network
communication between client and database server more efficient and
more secure.

For more information, please have a look at the mxODBC Connect product
page, in particular, the full list of available features.

For more information, please see the product page:

http://www.egenix.com/products/python/mxODBCConnect/



NEWS

The 2.0.2 release of mxODBC Connect includes the following
enhancements and fixes:

Security Enhancements
-

 * Upgraded client and server to eGenix pyOpenSSL 0.13.0-1.0.1c.

Server Enhancements
---

 * Added support for unlimited connection licenses.

 * The server installer on Windows will now install the Microsoft
   Visual C++ 2008 SP1 Redistributable Package (if necessary) instead
   of shipping with side-by-side runtime DLLs. This resolves
   installation issues on fresh Windows server installations.

 * Improved the active connection logging to show more accurate
   figures in situations where a lot of new connections are opened at
   once.

 * mxODBC Connect Server will now free resources on broken connections
   much earlier than before. The setting is configurable using the
   max_session_reconnect_time parameter in the server's [Activity]
   configuration and defaults to 60 seconds.

Client Enhancements
---

 * No fixes were necessary.

Misc


 * Added a note that even with an unlimited license, the server sill
   uses an adjustable max_session configuration parameter to limit the
   effect of denial-of-service attacks.


mxODBC Connect 2.0 was released on 2012-08-20. These are the
highlights of the new release:

mxODBC Connect 2.0 Enhanced API
---

 * mxODBC Connect Server now uses mxODBC 3.2 internally and makes its
   API available in the mxODBC Connect Client. This is a major step
   forward from the mxODBC 3.0 version used in mxODBC Connect Server
   1.0.

 * mxODBC Connect Client comes with all the mxODBC enhancements,
   including:

   - connection and cursor objects can be used as context managers

   - adjustable parameter styles (qmark or named)

   - connection .autocommit attribute to easily switch on autocommit

   - adjustable timestamp resolution

   - new possibilities to set connection and cursor options to adjust
 the ODBC objects to your application needs, e.g. set a connection
 read-only or set a query timeout

   - adjustable decimal, datetime and string formats

   - adjustable warning format to be able to handle server warnings
 without client interaction

   - greatly improved result set scrolling support

   - Unicode support for all catalog methods

   - Access to additional result set meta data via
 cursor.getcolattribute()

Updated Compatibility
-

 * The server now features all the ODBC driver compatibility
   enhancements provided by mxODBC 

Re: KAJOL SEX VIDEOS'''''''''''''''''''

2012-12-14 Thread chrisgetzinger52
On Thursday, August 2, 2012 10:35:25 AM UTC-6, devi wrote:
> KAJAL SEX VIDEOS
> 
> http://maxworkerds.co.cc

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Christian Heimes
Am 14.12.2012 04:25, schrieb Greg Donald:
> On Thu, Dec 13, 2012 at 8:49 PM,   wrote:
>> My aim is to get a job into google or cisco or facebok.
> 
> I made it to the 4th interview with Google.  When they say they want a
> "developer" they really mean they want a developer/sysadmin/kernel
> hacker/c/c++ guru.  I nailed all the Python questions in interviews #2
> and #3, but then at interview #4 they started asking inode questions,
> how to implement a compiler, how to design my own version of
> memcopy(), etc.  It didn't really matter to them that I had 2M
> downloads on Google Play, or that I knew Ruby, Rails, Python, Django,
> PHP, iOS and Java..  I didn't know how to move 2GBs of memory from
> here to there without using memcopy(), so that was that :(

Oh, that really hurts. :( I guess, you got your hopes up, when you made
it through interview #2 and #3 with flaming blazes. On the other hand
you are now aware of your shortcomings and can learn about it for your
next interview.

To be fair, memcpy() is a pretty simple function. It can be implemented
in just about two lines of C code plus five lines of boiler plate. It
shows, if you have very basic understanding about memory layout and
pointer arithmetics.

You have to translate something like

def memcpy(dest, src, n):
for i in xrange(n):
dest[i] = src[i]

into C code. Here is a rather nonperformance solution. It copies just
one byte per cycle. A better implementation could copy 4 or 8 bytes at
once and handle the tail in a switch statement.

void *memcpy(void *dest, const void *src, size_t n)
{
char *destptr = (char*)dest;
char *srcptr = (char*)src;
while (n--) {
   *destptr++ = *srcptr++;
}
return dest;
}

destptr and srcptr are the memory addresses of a byte (char). *destptr
is the value at a specific memory location. The code in the loop copies
the value at address srcptr to the location at destptr and then moves
both pointers one step to the right (++). That's all. ;)

Christian
-- 
http://mail.python.org/mailman/listinfo/python-list


Call for Papers - FOSDEM 2013 - Python Devroom

2012-12-14 Thread Stéphane Wirtel
Hi all,

This is the official call for sessions for the FOSDEM 2013 [1] python devroom.

This year, Python will be represented by its Community. If you want to discuss
with a lot of Python Users, it's the place to be in February !

Like every year, FOSDEM [1] will take place the first week-end of February in
Brussels (Belgium).

We will have a room in the K building (80 seats). This dev room will be open all
day Sunday, February 3rd.

If you want to hold a session in the Python devroom, please fill this survey [2]

Call for Papers is open until December 21st

This year, the submissions will be reviewed by a committee:

* Tarek Ziade - https://twitter.com/tarek_ziade (Mozilla)
* Ludovic Gasc - https://twitter.com/GMLudo (Eyepea)
* Christophe Simonis - https://twitter.com/KangOl (OpenERP)
* Stephane Wirtel - https://twitter.com/matrixise (OpenERP)

Thank you for submitting your sessions and see you soon in Brussels to talk
Python and/or have some nice Belgian Beers.

[1] http://fosdem.org/2013/
[2] http://python-fosdem.org

Here is the link of this announce: 
http://wirtel.be/posts/en/2012/11/20/call_of_papers_fosdem_2013/

Please, could you share this information, thank you

Best regards,

Stephane Wirtel (@matrixise)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Stefan Behnel
suresh.pinn...@gmail.com, 14.12.2012 03:49:
> My aim is to get a job into google or cisco or facebok.

Why?

There are lots of attractive places to work at. Choosing a less visible one
means that you have a higher chance of getting hired in the first place,
simply because less people aim for the same job. If it's a smaller company,
it usually also means that you will get a more interesting job because,
once hired, you end up working in a less crowded place with more white
spots in the environment of pre-staked claims that you drop into. And thus,
with a broader set of things for you to do and to try out.

So you get more by investing less. Not the worst choice IMHO.

Stefan


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Where to contribute Unicode General Category encoding/decoding

2012-12-14 Thread Pander Musubi
On Friday, December 14, 2012 1:06:23 AM UTC+1, Steven D'Aprano wrote:
> On Thu, 13 Dec 2012 07:30:57 -0800, Pander Musubi wrote:
> 
> 
> 
> > I was expecting PyPI. Here is the code, please advise on where to submit
> 
> > it:
> 
> >   http://pastebin.com/dbzeasyq
> 
> 
> 
> If anywhere, either a third-party module, or the unicodedata standard 
> 
> library module.
> 
> 
> 
> 
> 
> Some unanswered questions:
> 
> 
> 
> - when would somebody need this function?
> 

When working with Unicode metedata, see below.

> 
> 
> - why is is called "decodeUnicodeGeneralCategory" when it 
> 
>   doesn't seem to have anything to do with decoding?

It is actually a simple LUT. I like your improvements below.

> - why is the parameter "sortable" called sortable, when it
> 
>   doesn't seem to have anything to do with sorting?

The values return are alphabetically sortable.

> 
> 
> 
> 
> 
> If this is useful at all, it would be more useful to just expose the data 
> 
> as a dict, and forget about an unnecessary wrapper function:
> 
> 
> 
> 
> 
> from collections import namedtuple
> 
> r = namedtuple("record", "other name desc")  # better field names needed!
> 
> 
> 
> GC = {
> 
> 'C' : r('Other', 'Other', 'Cc | Cf | Cn | Co | Cs'),
> 
> 'Cc': r('Control', 'Control', 
> 
> 'a C0 or C1 control code'), # a.k.a. cntrl
> 
> 'Cf': r('Format', 'Format', 'a format control character'),
> 
> 'Cn': r('Unassigned', 'Unassigned', 
> 
> 'a reserved unassigned code point or a noncharacter'),
> 
> 'Co': r('Private Use', 'Private_Use', 'a private-use character'),
> 
> 'Cs': r('Surrogate', 'Surrogate', 'a surrogate code point'),
> 
> 'L' : r('Letter', 'Letter', 'Ll | Lm | Lo | Lt | Lu'),
> 
> 'LC': r('Letter, Cased', 'Cased_Letter', 'Ll | Lt | Lu'),
> 
> 'Ll': r('Letter, Lowercase', 'Lowercase_Letter', 
> 
> 'a lowercase letter'),
> 
> 'Lm': r('Letter, Modifier', 'Modifier_Letter', 'a modifier letter'),
> 
> 'Lo': r('Letter, Other', 'Other_Letter', 
> 
> 'other letters, including syllables and ideographs'),
> 
> 'Lt': r('Letter, Titlecase', 'Titlecase_Letter', 
> 
> 'a digraphic character, with first part uppercase'),
> 
> 'Lu': r('Letter, Uppercase', 'Uppercase_Letter', 
> 
> 'an uppercase letter'),
> 
> 'M' : r('Mark', 'Mark', 'Mc | Me | Mn '), # a.k.a. Combining_Mark
> 
> 'Mc': r('Mark, Spacing', 'Spacing_Mark', 
> 
> 'a spacing combining mark (positive advance width)'),
> 
> 'Me': r('Mark, Enclosing', 'Enclosing_Mark',
> 
> 'an enclosing combining mark'),
> 
> 'Mn': r('Mark, Nonspacing', 'Nonspacing_Mark', 
> 
> 'a nonspacing combining mark (zero advance width)'),
> 
> 'N' : r('Number', 'Number', 'Nd | Nl | No'),
> 
> 'Nd': r('Number, Decimal', 'Decimal_Number', 
> 
> 'a decimal digit'), # a.k.a. digit
> 
> 'Nl': r('Number, Letter', 'Letter_Number', 
> 
> 'a letterlike numeric character'),
> 
> 'No': r('Number, Other', 'Other_Number',
> 
> 'a numeric character of other type'),
> 
> 'P' : r('Punctuation', 'Punctuation',  
> 
> 'Pc | Pd | Pe | Pf | Pi | Po | Ps'), # a.k.a. punct
> 
> 'Pc': r('Punctuation, Connector', 'Connector_Punctuation', 
> 
> 'a connecting punctuation mark, like a tie'),
> 
> 'Pd': r('Punctuation, Dash', 'Dash_Punctuation', 
> 
> 'a dash or hyphen punctuation mark'),
> 
> 'Pe': r('Punctuation, Close', 'Close_Punctuation', 
> 
> 'a closing punctuation mark (of a pair)'),
> 
> 'Pf': r('Punctuation, Final', 'Final_Punctuation', 
> 
> 'a final quotation mark'),
> 
> 'Pi': r('Punctuation, Initial', 'Initial_Punctuation',
> 
> 'an initial quotation mark'),
> 
> 'Po': r('Punctuation, Other', 'Other_Punctuation', 
> 
> 'a punctuation mark of other type'),
> 
> 'Ps': r('Punctuation, Open', 'Open_Punctuation',
> 
> 'an opening punctuation mark (of a pair)'),
> 
> 'S' : r('Symbol', 'Symbol', 'Sc | Sk | Sm | So'),
> 
> 'Sc': r('Symbol, Currency', 'Currency_Symbol', 'a currency sign'),
> 
> 'Sk': r('Symbol, Modifier', 'Modifier_Symbol',
> 
> 'a non-letterlike modifier symbol'),
> 
> 'Sm': r('Symbol, Math', 'Math_Symbol', 
> 
> 'a symbol of mathematical use'),
> 
> 'So': r('Symbol, Other', 'Other_Symbol', 'a symbol of other type'),
> 
> 'Z' : r('Separator', 'Separator', 'Zl | Zp | Zs'),
> 
> 'Zl': r('Separator, Line', 'Line_Separator',
> 
> 'U+2028 LINE SEPARATOR only'),
> 
> 'Zp': r('Separator, Paragraph', 'Paragraph_Separator',
> 
> 'U+2029 PARAGRAPH SEPARATOR only'),
> 
> 'Zs': r('Separator, Space', 'Space_Separator', 
> 
> 'a space character (of various non-zero widths)'),
> 
> }
> 
> 
> 
> del r
> 
> 
> 
> 
> 
> Usage is then trivially the same as normal dict and attrib

Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Dave Angel
On 12/14/2012 01:56 AM, Devin Jeanpierre wrote:
> On Fri, Dec 14, 2012 at 1:13 AM, rusi  wrote:
>> On Dec 14, 8:33 am, Dave Angel  wrote:
>>> Do you know any one computer language thoroughly?  Or just a little of
>>> many languages?
>> There is a quote by Bruce Lee to the effect:
>> I am not afraid of the man who knows 10,000 kicks
>> I am afraid of the man who has practised 1 kick 10,000 times
> It's worth pointing out that kicks stay relevant for your entire life.
> Unfortunately, many programming languages don't.
>
> I guess the next metaphor would be stock investments and
> diversification. Point is, don't just practice one kick.

But if you never learn any one move thoroughly, knowing what several
others are supposed to look like isn't going to help.

i worked once for a company that had a very simple programming test for
the interview (only one interview - you either made it, or you didn't). 
The candidate was asked if he was experienced with the particular
language, then given 15 or 20 minutes to write something.  On paper, no
computer available.  Afterwards he was to discuss what he did, why, and
what other options were available and what advantages they might have. 
No library functions were needed.

I wrote my answer down, then stopped the interviewer as he was about to
leave for 15 minutes.  We discussed my answer thoroughly.  Later, after
I was working there, I discovered that over half of the candidates
couldn't write any code for the problem.  No starting place for a
discussion.

Four years later i was hired at a company which prided itself on a tough
interview question, which was done on a computer, and usually took an
hour or more.  They didn't even ask me to try it, nor even tell me about
it till long after I started work.  People there knew me, and the
founder of the company called me when his company had a place where I
could fit.



-- 

DaveA

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Running a python script under Linux

2012-12-14 Thread Hans Mulder
On 14/12/12 03:45:18, Steven D'Aprano wrote:
> I understand this is not exactly a Python question, but it may be of 
> interest to other Python programmers, so I'm asking it here instead of a 
> more generic Linux group.
> 
> I have a Centos system which uses Python 2.4 as the system Python, so I 
> set an alias for my personal use:
> 
> [steve@ando ~]$ which python
> alias python='python2.7'
> /usr/local/bin/python2.7
> 
> 
> When I call "python some_script.py" from the command line, it runs under 
> Python 2.7 as I expected. So I give the script a hash-bang line:
> 
> #!/usr/bin/env python
> 
> and run the script directly, but instead of getting Python 2.7, it runs 
> under Python 2.4 and gives me system errors.
> 
> When I run env directly, it ignores my alias:
> 
> steve@ando ~]$ /usr/bin/env python -V
> Python 2.4.3
> 
> 
> What am I doing wrong?

You're using an alias.  Aliases are not normally exported, and
even if they are (e.g. ksh can be configure to export aliases),
env doesn't recognize them.

What would work, is changing your PATH environment variable
so that the first python on your PATH is the one you want,
or a symlink pointing to it.

The Pythonic way to get what you want, is to be explicit:

#!/usr/local/bin/python2.7 -V

If you do that, it will even work in situations where you
can't control PATH, such as CGI scripts and cron jobs.

There are situations where using #!/usr/bin/env makes sense,
but yours isn't one of them.

Hope this helps,

-- HansM




-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Running a python script under Linux

2012-12-14 Thread D'Arcy J.M. Cain
On Fri, 14 Dec 2012 14:18:28 +0100
Hans Mulder  wrote:
> The Pythonic way to get what you want, is to be explicit:
> 
> #!/usr/local/bin/python2.7 -V
> 
> If you do that, it will even work in situations where you
> can't control PATH, such as CGI scripts and cron jobs.

As long as you only run on one system that's OK.  That won't work on
NetBSD or Linux[1] for example.

> There are situations where using #!/usr/bin/env makes sense,
> but yours isn't one of them.

#! /usr/bin/env python2.7

[1]: Well, Ubuntu anyway.  I don't know about the others.

-- 
D'Arcy J.M. Cain  |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
IM: da...@vex.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Roy Smith
In article ,
 Stefan Behnel  wrote:

> suresh.pinn...@gmail.com, 14.12.2012 03:49:
> > My aim is to get a job into google or cisco or facebok.
> 
> Why?
> 
> There are lots of attractive places to work at. Choosing a less visible one
> means that you have a higher chance of getting hired in the first place,
> simply because less people aim for the same job. If it's a smaller company,
> it usually also means that you will get a more interesting job because,
> once hired, you end up working in a less crowded place with more white
> spots in the environment of pre-staked claims that you drop into. And thus,
> with a broader set of things for you to do and to try out.
> 
> So you get more by investing less. Not the worst choice IMHO.

On the other hand, as somebody who's looking to hire software engineers, 
I can tell you that we look at prior experience at Google or Facebook as 
a positive thing on a resume.  It's the same way we look at admission to 
a top-tier school.  It doesn't always mean the person is good, but it's 
a positive signal that's likely to get your resume a second looks.

That being said, I've worked for companies ranging from 3 employees to 
40,000 employees.  I definitely like working for the small ones better.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Chris Angelico
On Sat, Dec 15, 2012 at 1:48 AM, Roy Smith  wrote:
> That being said, I've worked for companies ranging from 3 employees to
> 40,000 employees.  I definitely like working for the small ones better.

My current job has one employee, it's just me and my boss. It's
satisfying to know that my work is really significant, but it feels
binding in that if I'm not there, the project is largely going to
stall. If I were to cease working there, the project would probably
fail. That's not such a good thing. Plus, I'm pretty sure working for
a biggish company is going to pay a tad more than an internet startup
that hasn't yet launched its flagship product can afford... oh well.
If the boss's vision is anything to go by, we're going to be bigger
than Microsoft, eBay, Facebook, and Google combined, and all by early
2013. So when I start working a one hour week for a six figure salary,
I'll let you know.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Running a python script under Linux

2012-12-14 Thread Hans Mulder
On 14/12/12 14:38:25, D'Arcy J.M. Cain wrote:
> On Fri, 14 Dec 2012 14:18:28 +0100
> Hans Mulder  wrote:
>> The Pythonic way to get what you want, is to be explicit:
>>
>> #!/usr/local/bin/python2.7 -V
>>
>> If you do that, it will even work in situations where you
>> can't control PATH, such as CGI scripts and cron jobs.
> 
> As long as you only run on one system that's OK.

As I understand it, the OP has a single system where the
system Python is CPython 2.4, and he has install 2.7 in
/usr/local/bin.

> That won't work on NetBSD or Linux[1] for example.

I would expect it to work, as long as /usr/local/bin/python2.7
exists and is a binary executable for the right architecture.

Why wouldn't it work?

It doesn't exceed the 32-character limit and it contains
only one option.  What other pitfalls are there?

>> There are situations where using #!/usr/bin/env makes sense,
>> but yours isn't one of them.
> 
> #! /usr/bin/env python2.7

On my box, that line might find a python2.7 in the
currently active virtualenv, which may have the wrong
set of third-party modules in its site-packages.

When I write a script that is meant to be used as a
utility, independent of which virtualenv is currently
active, then I'll make sure that its #! line points
at the Python2.7 install I used to test it.

> [1]: Well, Ubuntu anyway.  I don't know about the others.


Just curious,

-- HansM

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread rusi
On Dec 14, 6:13 pm, Dave Angel  wrote:
> On 12/14/2012 01:56 AM, Devin Jeanpierre wrote:
>
> > On Fri, Dec 14, 2012 at 1:13 AM, rusi  wrote:
> >> On Dec 14, 8:33 am, Dave Angel  wrote:
> >>> Do you know any one computer language thoroughly?  Or just a little of
> >>> many languages?
> >> There is a quote by Bruce Lee to the effect:
> >> I am not afraid of the man who knows 10,000 kicks
> >> I am afraid of the man who has practised 1 kick 10,000 times
> > It's worth pointing out that kicks stay relevant for your entire life.
> > Unfortunately, many programming languages don't.
>
> > I guess the next metaphor would be stock investments and
> > diversification. Point is, don't just practice one kick.
>
> But if you never learn any one move thoroughly, knowing what several
> others are supposed to look like isn't going to help.

It comes down to the difference between active and passive knowledge.

Here is an interview that distinguishes between doing music and merely
passively hearing and the unfortunate consequences of assuming the
latter is enough:
http://jacobneedleman.squarespace.com/blog/2012/12/12/music-is-something-you-do.html

Ideas which were summarized by the great pianist Josef Lhevine as
follows:

If I dont practice for one day I know it
If I dont practice for two days my audience knows it
If I dont practice for three days the critics know it

So much of what passes for CS education is about doling out pre-cooked
things -- programs, concepts, jargon -- that companies can be forgiven
for being stringent about whom they employ.

Heres Alan Kay on Stanford: (One could expect other univs to do
worse):

I fear —as far as I can tell— that most undergraduate degrees in
computer science these days are basically Java vocational training.
I’ve heard complaints from even mighty Stanford University with its
illustrious faculty that basically the undergraduate computer science
program is little more than Java certification.
from http://queue.acm.org/detail.cfm?id=1039523
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Where to contribute Unicode General Category encoding/decoding

2012-12-14 Thread Pander Musubi
On Friday, December 14, 2012 2:07:51 PM UTC+1, Pander Musubi wrote:
> On Friday, December 14, 2012 1:06:23 AM UTC+1, Steven D'Aprano wrote:
> 
> > On Thu, 13 Dec 2012 07:30:57 -0800, Pander Musubi wrote:
> 
> > 
> 
> > 
> 
> > 
> 
> > > I was expecting PyPI. Here is the code, please advise on where to submit
> 
> > 
> 
> > > it:
> 
> > 
> 
> > >   http://pastebin.com/dbzeasyq
> 
> > 
> 
> > 
> 
> > 
> 
> > If anywhere, either a third-party module, or the unicodedata standard 
> 
> > 
> 
> > library module.
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > Some unanswered questions:
> 
> > 
> 
> > 
> 
> > 
> 
> > - when would somebody need this function?
> 
> > 
> 
> 
> 
> When working with Unicode metedata, see below.
> 
> 
> 
> > 
> 
> > 
> 
> > - why is is called "decodeUnicodeGeneralCategory" when it 
> 
> > 
> 
> >   doesn't seem to have anything to do with decoding?
> 
> 
> 
> It is actually a simple LUT. I like your improvements below.
> 
> 
> 
> > - why is the parameter "sortable" called sortable, when it
> 
> > 
> 
> >   doesn't seem to have anything to do with sorting?
> 
> 
> 
> The values return are alphabetically sortable.
> 
> 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > If this is useful at all, it would be more useful to just expose the data 
> 
> > 
> 
> > as a dict, and forget about an unnecessary wrapper function:
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > from collections import namedtuple
> 
> > 
> 
> > r = namedtuple("record", "other name desc")  # better field names needed!
> 
> > 
> 
> > 
> 
> > 
> 
> > GC = {
> 
> > 
> 
> > 'C' : r('Other', 'Other', 'Cc | Cf | Cn | Co | Cs'),
> 
> > 
> 
> > 'Cc': r('Control', 'Control', 
> 
> > 
> 
> > 'a C0 or C1 control code'), # a.k.a. cntrl
> 
> > 
> 
> > 'Cf': r('Format', 'Format', 'a format control character'),
> 
> > 
> 
> > 'Cn': r('Unassigned', 'Unassigned', 
> 
> > 
> 
> > 'a reserved unassigned code point or a noncharacter'),
> 
> > 
> 
> > 'Co': r('Private Use', 'Private_Use', 'a private-use character'),
> 
> > 
> 
> > 'Cs': r('Surrogate', 'Surrogate', 'a surrogate code point'),
> 
> > 
> 
> > 'L' : r('Letter', 'Letter', 'Ll | Lm | Lo | Lt | Lu'),
> 
> > 
> 
> > 'LC': r('Letter, Cased', 'Cased_Letter', 'Ll | Lt | Lu'),
> 
> > 
> 
> > 'Ll': r('Letter, Lowercase', 'Lowercase_Letter', 
> 
> > 
> 
> > 'a lowercase letter'),
> 
> > 
> 
> > 'Lm': r('Letter, Modifier', 'Modifier_Letter', 'a modifier letter'),
> 
> > 
> 
> > 'Lo': r('Letter, Other', 'Other_Letter', 
> 
> > 
> 
> > 'other letters, including syllables and ideographs'),
> 
> > 
> 
> > 'Lt': r('Letter, Titlecase', 'Titlecase_Letter', 
> 
> > 
> 
> > 'a digraphic character, with first part uppercase'),
> 
> > 
> 
> > 'Lu': r('Letter, Uppercase', 'Uppercase_Letter', 
> 
> > 
> 
> > 'an uppercase letter'),
> 
> > 
> 
> > 'M' : r('Mark', 'Mark', 'Mc | Me | Mn '), # a.k.a. Combining_Mark
> 
> > 
> 
> > 'Mc': r('Mark, Spacing', 'Spacing_Mark', 
> 
> > 
> 
> > 'a spacing combining mark (positive advance width)'),
> 
> > 
> 
> > 'Me': r('Mark, Enclosing', 'Enclosing_Mark',
> 
> > 
> 
> > 'an enclosing combining mark'),
> 
> > 
> 
> > 'Mn': r('Mark, Nonspacing', 'Nonspacing_Mark', 
> 
> > 
> 
> > 'a nonspacing combining mark (zero advance width)'),
> 
> > 
> 
> > 'N' : r('Number', 'Number', 'Nd | Nl | No'),
> 
> > 
> 
> > 'Nd': r('Number, Decimal', 'Decimal_Number', 
> 
> > 
> 
> > 'a decimal digit'), # a.k.a. digit
> 
> > 
> 
> > 'Nl': r('Number, Letter', 'Letter_Number', 
> 
> > 
> 
> > 'a letterlike numeric character'),
> 
> > 
> 
> > 'No': r('Number, Other', 'Other_Number',
> 
> > 
> 
> > 'a numeric character of other type'),
> 
> > 
> 
> > 'P' : r('Punctuation', 'Punctuation',  
> 
> > 
> 
> > 'Pc | Pd | Pe | Pf | Pi | Po | Ps'), # a.k.a. punct
> 
> > 
> 
> > 'Pc': r('Punctuation, Connector', 'Connector_Punctuation', 
> 
> > 
> 
> > 'a connecting punctuation mark, like a tie'),
> 
> > 
> 
> > 'Pd': r('Punctuation, Dash', 'Dash_Punctuation', 
> 
> > 
> 
> > 'a dash or hyphen punctuation mark'),
> 
> > 
> 
> > 'Pe': r('Punctuation, Close', 'Close_Punctuation', 
> 
> > 
> 
> > 'a closing punctuation mark (of a pair)'),
> 
> > 
> 
> > 'Pf': r('Punctuation, Final', 'Final_Punctuation', 
> 
> > 
> 
> > 'a final quotation mark'),
> 
> > 
> 
> > 'Pi': r('Punctuation, Initial', 'Initial_Punctuation',
> 
> > 
> 
> > 'an initial quotation mark'),
> 
> > 
> 
> > 'Po': r('Punctuation, Other', 'Other_Punctuation', 
> 
> > 
> 
> > 'a punctuation mark of other type'),
> 
> > 
> 
> > 'Ps': r('Punctuation, Open', 'Open_Punctuation',
> 
> > 
> 
> > 'an opening punctuation mark (of a pair)'),
> 
> > 
> 
> > 'S' : r('Symbol', 'Symbol', 'Sc | 

Re: Where to contribute Unicode General Category encoding/decoding

2012-12-14 Thread Pander Musubi
On Friday, December 14, 2012 5:22:31 PM UTC+1, Pander Musubi wrote:
> On Friday, December 14, 2012 2:07:51 PM UTC+1, Pander Musubi wrote:
> 
> > On Friday, December 14, 2012 1:06:23 AM UTC+1, Steven D'Aprano wrote:
> 
> > 
> 
> > > On Thu, 13 Dec 2012 07:30:57 -0800, Pander Musubi wrote:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > I was expecting PyPI. Here is the code, please advise on where to submit
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > it:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > >   http://pastebin.com/dbzeasyq
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > If anywhere, either a third-party module, or the unicodedata standard 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > library module.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Some unanswered questions:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > - when would somebody need this function?
> 
> > 
> 
> > > 
> 
> > 
> 
> > 
> 
> > 
> 
> > When working with Unicode metedata, see below.
> 
> > 
> 
> > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > - why is is called "decodeUnicodeGeneralCategory" when it 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   doesn't seem to have anything to do with decoding?
> 
> > 
> 
> > 
> 
> > 
> 
> > It is actually a simple LUT. I like your improvements below.
> 
> > 
> 
> > 
> 
> > 
> 
> > > - why is the parameter "sortable" called sortable, when it
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   doesn't seem to have anything to do with sorting?
> 
> > 
> 
> > 
> 
> > 
> 
> > The values return are alphabetically sortable.
> 
> > 
> 
> > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > If this is useful at all, it would be more useful to just expose the data 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > as a dict, and forget about an unnecessary wrapper function:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > from collections import namedtuple
> 
> > 
> 
> > > 
> 
> > 
> 
> > > r = namedtuple("record", "other name desc")  # better field names needed!
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > GC = {
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'C' : r('Other', 'Other', 'Cc | Cf | Cn | Co | Cs'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Cc': r('Control', 'Control', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a C0 or C1 control code'), # a.k.a. cntrl
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Cf': r('Format', 'Format', 'a format control character'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Cn': r('Unassigned', 'Unassigned', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a reserved unassigned code point or a noncharacter'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Co': r('Private Use', 'Private_Use', 'a private-use character'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Cs': r('Surrogate', 'Surrogate', 'a surrogate code point'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'L' : r('Letter', 'Letter', 'Ll | Lm | Lo | Lt | Lu'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'LC': r('Letter, Cased', 'Cased_Letter', 'Ll | Lt | Lu'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Ll': r('Letter, Lowercase', 'Lowercase_Letter', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a lowercase letter'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Lm': r('Letter, Modifier', 'Modifier_Letter', 'a modifier letter'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Lo': r('Letter, Other', 'Other_Letter', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'other letters, including syllables and ideographs'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Lt': r('Letter, Titlecase', 'Titlecase_Letter', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a digraphic character, with first part uppercase'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Lu': r('Letter, Uppercase', 'Uppercase_Letter', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'an uppercase letter'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'M' : r('Mark', 'Mark', 'Mc | Me | Mn '), # a.k.a. Combining_Mark
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Mc': r('Mark, Spacing', 'Spacing_Mark', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a spacing combining mark (positive advance width)'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Me': r('Mark, Enclosing', 'Enclosing_Mark',
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'an enclosing combining mark'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Mn': r('Mark, Nonspacing', 'Nonspacing_Mark', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a nonspacing combining mark (zero advance width)'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'N' : r('Number', 'Number', 'Nd | Nl | No'),
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Nd': r('Number, Decimal', 'Decimal_Number', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'a decimal digit'), # a.k.a. digit
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 'Nl': r('Number, Letter', 'Letter_Number', 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >

Re: www spankwire com - Amazing porn video collection

2012-12-14 Thread teddymanal
On Thursday, July 24, 2008 11:55:04 PM UTC+3, baba...@gmail.com wrote:
> www spankwire com
> .
> 
> >>Best Collection of Spankwire Videos<<
> http://vids365.com/watch.php<<<
> >>FREE www spankwire VIDEOS<<<
> 
> .
> www spankwire com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Running a python script under Linux

2012-12-14 Thread Michael Torrie
On 12/13/2012 07:45 PM, Steven D'Aprano wrote:
> When I call "python some_script.py" from the command line, it runs under 
> Python 2.7 as I expected. So I give the script a hash-bang line:
> 
> #!/usr/bin/env python
> 
> and run the script directly, but instead of getting Python 2.7, it runs 
> under Python 2.4 and gives me system errors.
> 
> When I run env directly, it ignores my alias:
> 
> steve@ando ~]$ /usr/bin/env python -V
> Python 2.4.3
> 
> 
> What am I doing wrong?

Hash-bang isn't a shell function; it's a kernel function.  There's no
reason why a shell setting (alias) would be known to the kernel.
Different shells have different ideas about aliases anyway.  And the
program that the she-bang tells the kernel to run is /usr/bin/env, again
something that doesn't have anything to do with the shell.  The only
thing the shell can communicate to the env program is the environment,
including the PATH variable, which env searches.

The reason it works this way is that the shell is simply another program
that can be replaced.  One could make a shell based on python, and it
might replace the bash "alias" command with a completely different
mechanism.

When I was first exposed to Linux, it took me a long time to understand
and appreciate how basic commands like ls and env are not part of shell
at all, unlike my experience with the DOS and Windows command.com and
cmd.exe shells.  At first I found this archaic and frustrating.  But
later I realized the great power of doing things this way.  If I didn't
like the way ls listed things, I could change it; replace ls easily.  I
remember seeing TSRs (remember them!) that would hook into command.com
and patch it to add or alter command.com commands.  The Unix way was
definitely cleaner.

-- 
http://mail.python.org/mailman/listinfo/python-list


os.system and subprocess odd behavior

2012-12-14 Thread py_genetic
Example of the issue for arguments sake:

Platform Ubuntu server 12.04LTS, python 2.7

Say file1.txt has "hello world" in it.

subprocess.Popen("cat < file1 > file2", shell = True)
subprocess.call("cat < file1 > file2", shell = True)
os.system("cat < file1 > file2")


I'm finding that file2 IS created, but with 0bytes in it, this happens when I 
try any sort of cmd to the system of the nature where I'm putting the output 
into a file.

I've made sure it isn't a permission issue.  The command runs fine from the cmd 
line and python is being run with super user privileges. Strait from the 
terminal I get a hello world copy as file2... as expected.

I would like python to simply exec the cmd and move on I don't want to read 
and write the stdout ect into python and write it to a file.  Any thoughts as 
to why this creates file2, but no data appears?  Is there a better way to do 
this?

Thank you!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OOP noob question: Mixin properties

2012-12-14 Thread Micky Hulse
Hi Steven!!! Thanks so much for the pro help, I really do appreciate it. :)

On Thu, Dec 13, 2012 at 4:53 PM, Steven D'Aprano
 wrote:
> Indentation is important. Please don't remove it. I've added it back in
> below:

Yikes! Sorry about that. I won't do that again in the future. :(

Thanks for adding the indentation back. :)

> The use of @property here doesn't give you any benefit (except, maybe, if
> you are paid by the line of code). Better to just expose the "cache"
> attribute directly, and likewise for the others. If, in the future, you
> need to turn them into computed properties, you can easily do so. But for
> now:

Ah, great to know! Thank you for the clarification, I needed that.

> class JSONResponseMixin(object):
> def __init__(self):
> self.cache = False
> self.cache_timeout = 86400
> self.cache_key = None
>
> and you're done.

Beautiful! That's nice. Very simple and clean (I had a feeling my
@decorator version was getting a bit "wordy").

>> Simply doing this:
>> class JSONResponseMixin(object):
>> cache = False
>> cache_timeout = 86400 # 24 hours.
>> cache_key = None
>> ...works just as good! Not to mention, it's less verbose.
> In my code above, the cache attributes are defined on a per-instance
> basis. Each instance will have its own set of three cache* attributes. In
> the version directly above, there is a single set of cache* attributes
> shared by all JSONResponseMixin instances.

Thank you for pointing this out! I had not realized that this was the
case. I'm still kinda new to OOP in Python and Python in general (I'm
learning it through Django).

> Will this make any practical difference? Probably not. Most importantly,
> if you write:
> instance = Api()  # class includes JSONResponseMixin
> instance.cache = True
> then the assignment to an attribute will create a non-shared per-instance
> attribute which overrides the class-level shared attribute. This is
> almost certainly the behaviour that you want. So this is a good example
> of using class attributes to implement shared default state.

Whoa, that's cool!

> There is one common place where the use of shared class attributes can
> lead to surprising results: if the class attribute is a mutable object
> such as a list or a dict, it may not behave the way you expect. That is
> because only *assignment* creates a new per-instance attribute:
> instance.attribute = "spam spam spam"  # overrides the class attribute
> while modifying the attribute in place does not:
> instance.shared_list.append("spam spam spam")
> # every instance of the class will now see the change

Exactly the type of details I was hoping to learn. Thank you so much
for taking the time to explain things in such detail and easy to
understand way. I really appreciate it. :)

> Apart from that Gotcha, the use of shared class attributes to implement
> default behaviour is perfectly acceptable.

Awesome! That's good to know.

> I actually prefer a functional response, up to the point where I'm
> passing so many arguments to functions that I can't keep track of what's
> what. Then I refactor into a class.

Ah, well that's good to know. There's a part of me that wants to
revert back to passing arguments to self.render_to_response(...);
after all, there's only 3 of them. On the flip side, if I hadn't
explored other options, I wouldn't have learned anything new.

Thanks a billion Steven! I owe you one.

Have a great holiday.

Cheers,
Micky
-- 
http://mail.python.org/mailman/listinfo/python-list


IV ECCOMAS Thematic Conference VipIMAGE 2013: FIRST ANNOUNCEMENT & CALL FOR CONTRIBUTIONS

2012-12-14 Thread tava...@fe.up.pt
Dear Colleague,

We are pleased to announce the International Conference VipIMAGE 2013 - IV 
ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE 
PROCESSING (www.fe.up.pt/~vipimage) to be held October 14-16, 2013, in Melia 
Madeira Mare Hotel, Madeira Island, Funchal, Portugal.


Possible Topics (not limited to)

• Signal and Image Processing 
• Computational Vision 
• Medical Imaging 
• Physics of Medical Imaging 
• Tracking and Analysis of Movement 
• Simulation and Modeling
• Image Acquisition 
• Industrial Applications 
• Shape Reconstruction 
• Objects Segmentation, Matching, Simulation 
• Data Interpolation, Registration, Acquisition and Compression 
• 3D Vision 
• Virtual Reality 
• Visual Inspection 
• Software Development for Image Processing and Analysis 
• Computer Aided Diagnosis, Surgery, Therapy, and Treatment 
• Computational Bioimaging and Visualization 
• Telemedicine Systems and their Applications

Invited Lecturers

• Daniel Rueckert - Imperial College London, UK
• Dimitris N. Metaxas - Rutgers University, USA
• Durval C. Costa - Champalimaud Foundation, Portugal
• James S Duncan - Yale School of Medicine, USA
• Milan Sonka - The University of Iowa, USA
• Richard Bowden - University of Surrey, UK

Thematic Sessions

Proposals to organize Thematic Session under the auspicious of VipIMAGE 2013 
are welcome.
The organizers of the selected thematic sessions will be included in the 
conference scientific committee and will have a reduced registration fee. 
Additionally, they will be responsible for the dissemination of their thematic 
session, may invite expertise researchers to have invited keynotes during their 
session and will participate in the review process of the submitted 
contributions.
Proposal for Thematic Sessions should be submitted by email to the conference 
co-chairs (tava...@fe.up.pt, rna...@fe.up.pt) until March 1, 2013.

Publications

Proceedings: The proceedings book will be published by the Taylor & Francis 
Group (www.balkema.nl/instructions.asp) and indexed by Thomson Reuters 
Conference Proceedings Citation Index, IET Inspect and Elsevier Scopus.
Springer Book: A book with 20 invited works from the ones presented in the 
conference will be published by Springer under the book series “Lecture Notes 
in Computational Vision and Biomechanics” (www.springer.com/series/8910).
Journal Publication: A dedicated special issue of the Taylor & Francis 
International Journal “Computer Methods in Biomechanics and Biomedical 
Engineering: Imaging & Visualization” (www.tandfonline.com/tciv) will be 
published with extended versions of the best works presented in the conference.

Important dates

• Deadline for Thematic Session Proposals: March 1, 2013
• Deadline for Extended Abstracts: April 15, 2013
• Authors Notification: May 1, 2013
• Deadline for Lectures and Papers: July 1, 2013


We are looking forward to see you in Funchal next October.

Kind regards,

João Manuel R. S. Tavares
Renato Natal Jorge
(conference co-chairs)

PS. For further details please have a look in the conference website at: 
www.fe.up.pt/~vipimage, or the Facebook page at: 
www.facebook.com/pages/Vipimage/237980719665456
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: os.system and subprocess odd behavior

2012-12-14 Thread Steven D'Aprano
On Fri, 14 Dec 2012 10:13:38 -0800, py_genetic wrote:

> Example of the issue for arguments sake:
> 
> Platform Ubuntu server 12.04LTS, python 2.7
> 
> Say file1.txt has "hello world" in it.
> 
> subprocess.Popen("cat < file1 > file2", shell = True)
> subprocess.call("cat < file1 > file2", shell = True) 
> os.system("cat < file1 > file2")
> 
> 
> I'm finding that file2 IS created, but with 0bytes in it, this happens
> when I try any sort of cmd to the system of the nature where I'm putting
> the output into a file.

I cannot confirm this behaviour. It works for me. When I try it, all 
three code snippets work as expected:

[steve@ando ~]$ rm file2 file3 file4
[steve@ando ~]$ cat file1
hello world
[steve@ando ~]$ python
Python 2.7.2 (default, May 18 2012, 18:25:10)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
py> import os, subprocess
py> subprocess.Popen("cat < file1 > file2", shell = True)

py> subprocess.call("cat < file1 > file3", shell = True)
0
py> os.system("cat < file1 > file4")
0
py> quit()
[steve@ando ~]$ cat file2
hello world
[steve@ando ~]$ cat file3
hello world
[steve@ando ~]$ cat file4
hello world


I have run this multiple times, as an unprivileged user, as the root 
user, and as sudo. It works perfectly every time.

Please check your code. Perhaps you have over-simplified the problem.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Roy Smith
In article <50cbaf19$0$29991$c3e8da3$54964...@news.astraweb.com>,
 Steven D'Aprano  wrote:

> On Fri, 14 Dec 2012 09:48:54 -0500, Roy Smith wrote:
> 
> > On the other hand, as somebody who's looking to hire software engineers,
> > I can tell you that we look at prior experience at Google or Facebook as
> > a positive thing on a resume.
> 
> Really? What size company do you work for?

I believe we're currently 12 full-time employees.

> Can you offer better pay and conditions than Google or Facebook?

There is no way we can compete with them on salary.  Nor do we buy 
everybody lunch every day, do their laundry, give them haircuts and 
massages, or walk their dogs.

But, we offer the chance to make a difference.  Most people at Google or 
Facebook are cogs in a very large machine.  It might be a well-fed, 
brightly colored, highly profitable machine, but a cog is a cog.

> If somebody can to me with prior experience at Google or Facebook, my 
> first thought would be "Ah, couldn't cut it with the big boys huh? If you 
> are good enough for Google, what the hell are you doing coming to us?"

Wow, you must have a really low opinion of yourself.  Part of being at a 
startup is believing in yourself.  Going around thinking, "he/she's too 
good for us" is not an effective way to screen potential candidates if 
you're trying to build a successful business.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Roy Smith
In article ,
 Chris Angelico  wrote:

> If the boss's vision is anything to go by, we're going to be bigger
> than Microsoft, eBay, Facebook, and Google combined, and all by early
> 2013. 

That's the kind of attitude you need to be at a startup.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: MySQLdb compare lower

2012-12-14 Thread Chris Angelico
On Sat, Dec 15, 2012 at 8:49 AM, Dennis Lee Bieber
 wrote:
> On Fri, 14 Dec 2012 15:16:54 +1100, Chris Angelico 
> declaimed the following in gmane.comp.python.general:
>
>> Yeah, it's one of the things that tripped me up when I did a
>> MySQL->PostgreSQL conversion earlier this year. The code was assuming
>> case insensitivity, and began failing on PG. Fortunately the simple
>> change of LIKE to ILIKE solved that.
>>
>> I'd MUCH rather be explicit about wanting case insensitivity. I wonder
>> who would go insane first if I ran an app using Wine under Linux in a
>> directory that's mounted via cifs from a Windows or OS/2 box... (And
>> yes, I have that setup, ready to go. Only there's an extra level of
>> indirection - I'd run it in an sshfs mount that points to my proxy
>> box. Extra safety, keeps messy networking away from my real boxes.)
>
> I suspect it is a 50/50 proposition. Having case-insensitive
> compares is probably easier for the simpler uses of MySQL (the many web
> servers configured with MySQL, provided as a convenience for untrained
> customers)... They don't have to tell users (on web page input forms)
> that search terms are case sensitive, and they don't have to come up
> with some code for a means of "logical" casing of input (for example,
> searching for a title, where it is common for words like "of", "a",
> "and" to be lowercase, but everything else is capitalized).

I still don't need to tell users that search terms are case sensitive. Look:

http://rosuav.com/1/

Type in a search term, it's not case sensitive! Oh, that's because it
uses ILIKE and everything happens correctly. Hmm. I wonder how I'd
change that (which is backed by PG) to be case sensitive? Ah! I make
it use LIKE instead. How do I make MySQL case sensitive? Declare the
column as binary, or as text, but with a different collation. And that
affects sorting too. Can you guarantee that you can, for instance,
have a column sorted case insensitively and searched case sensitively?
It's probably possible, but I wouldn't depend on it without searching
the docs - or, more likely, browsing StackOverflow answers.

Database defaults are all very well, but it's better to have a safe
default that's easily overridden than an enforced state that you have
to change configuration to get around. Explicit is better than
implicit.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Terry Reedy

On 12/14/2012 5:21 PM, Dennis Lee Bieber wrote:

On Fri, 14 Dec 2012 07:05:12 -0800 (PST), rusi 
declaimed the following in gmane.comp.python.general:


Ideas which were summarized by the great pianist Josef Lhevine as
follows:

If I dont practice for one day I know it
If I dont practice for two days my audience knows it
If I dont practice for three days the critics know it


Interesting... One would have thought the critics should have
detected the missing practice before the general audience... Unless that
is supposed to also be a dig on critics being the least knowledgeable



You are right. Critics before audience. And multiple people have been 
credited with the quote.


http://www.barrypopik.com/index.php/new_york_city/entry/miss_one_day_of_practice_i_notice_miss_two_the_critics_notice_miss_three_th/

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Cameron Simpson
On 14Dec2012 16:57, Dennis Lee Bieber  wrote:
| On Fri, 14 Dec 2012 12:42:27 +0100, Christian Heimes
|  declaimed the following in
| gmane.comp.python.general:
| > 
| > To be fair, memcpy() is a pretty simple function. It can be implemented
| > in just about two lines of C code plus five lines of boiler plate. It
| > shows, if you have very basic understanding about memory layout and
| > pointer arithmetics.
| > 
| > You have to translate something like
| > 
| > def memcpy(dest, src, n):
| > for i in xrange(n):
| > dest[i] = src[i]
| > 
| > into C code. Here is a rather nonperformance solution. It copies just
| > one byte per cycle. A better implementation could copy 4 or 8 bytes at
| > once and handle the tail in a switch statement.
| > 
| > void *memcpy(void *dest, const void *src, size_t n)
| > {
| > char *destptr = (char*)dest;
| > char *srcptr = (char*)src;
| > while (n--) {
| >*destptr++ = *srcptr++;
| > }
| > return dest;
| > }
| > 
| > destptr and srcptr are the memory addresses of a byte (char). *destptr
| > is the value at a specific memory location. The code in the loop copies
| > the value at address srcptr to the location at destptr and then moves
| > both pointers one step to the right (++). That's all. ;)
| 
|   That is ignoring the possibility of overlapping source/destination
| ranges (in which one may need to copy from the end rather than the
| start).

If you're going to be picky, memcpy() is not required to allow for that.
That allows a high speed implementation. memmove() exists to cover the
more general case.
-- 
Cameron Simpson 

NOTWORK: n. A network when it is acting flaky. Origin (?) IBM.
- Hackers' Dictionary
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-14 Thread Steven D'Aprano
On Fri, 14 Dec 2012 19:45:40 -0500, Roy Smith wrote:

>> If somebody can to me with prior experience at Google or Facebook, my
>> first thought would be "Ah, couldn't cut it with the big boys huh? If
>> you are good enough for Google, what the hell are you doing coming to
>> us?"
> 
> Wow, you must have a really low opinion of yourself.  Part of being at a
> startup is believing in yourself.

What makes you think I work for a startup? It might astonish some people 
in the IT industry, but not every company is under three years old and 
still burning through some VC's money.

As for the attitude "believe in yourself", that's a big part of why 50% 
of startups fail within four years and over 70% within ten years. That's 
new business in general, by the way. I expect that startups in the tech 
industry will be less successful.

To paraphrase Terry Pratchett:

"If you trust in yourself, and believe in your dreams, and follow your 
star... you'll be beaten by people who work hard and learn things."

Rather than "believe in yourself", I prefer "Know Thyself". A man's got 
to know his limitations. That applies for the company you work for too.


> Going around thinking, "he/she's too
> good for us" is not an effective way to screen potential candidates if
> you're trying to build a successful business.

Perhaps we have a different perspective, but I don't think it is wise to 
hire somebody who is likely to leave for greener pastures just as you are 
starting to rely on them.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: os.system and subprocess odd behavior

2012-12-14 Thread Dieter Maurer
py_genetic  writes:

> Example of the issue for arguments sake:
>
> Platform Ubuntu server 12.04LTS, python 2.7
>
> Say file1.txt has "hello world" in it.
  ^
Here, you speak of "file1.txt" (note the extension ".txt")

> subprocess.Popen("cat < file1 > file2", shell = True)
> subprocess.call("cat < file1 > file2", shell = True)
> os.system("cat < file1 > file2")

But in your code, you use "file1" (without extension).

If your code really references a non-existing file, you may well
get what you are observing.

-- 
http://mail.python.org/mailman/listinfo/python-list