[CPyUG] [OT]想去西安工作,有没有后门可走?

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[CPyUG] [OT]想去西安工作,有没有后门可走?

智障
 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

hejibo
js闭包,是不是就是不让别人看到你的js代码是什么?
---------------------------
He Jibo
Department of Psychology,
Beckman Institute for Advanced Science and Technology
University of Illinois, Urbana Champaign,
603 East Daniel St.,
Champaign, IL 61820
website: www.hejibo.info


2011/12/11 智障 <iasybvm@163.com>
 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

Rujia Liu
我觉得他的意思是懂得closure的原理,以及如何使用

2011/12/12 He Jibo <[hidden email]>:

> js闭包,是不是就是不让别人看到你的js代码是什么?
> ---------------------------
> He Jibo
> Department of Psychology,
> Beckman Institute for Advanced Science and Technology
> University of Illinois, Urbana Champaign,
> 603 East Daniel St.,
> Champaign, IL 61820
> website: www.hejibo.info
>
>
>
> 2011/12/11 智障 <[hidden email]>
>>
>>  基本情况:
>> 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
>>    jquery正在使用中,离大牛还有一段距离。
>>
>> 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>>
>> 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>>
>> 4附上一段代码,比着tornado的db模块写的。
>>
>> #!/usr/bin/python
>>
>> import psycopg2
>> import copy
>> import itertools
>> import logging
>> import contextlib
>>
>> class Connection(object):
>>     def __init__(self, database, user="", password="", host="localhost"):
>>         self.conn = psycopg2.connect(database=database, user=user,
>>                                      password=password, host=host)
>>         self.host = host
>>     @contextlib.contextmanager
>>     def cursor(self):
>>         try:
>>             cursor = self.conn.cursor()
>>             yield cursor
>>         except Exception, e:
>>             print cursor.query
>>             cursor.close()
>>             logging.error("Database error on %s", self.host,
>> exc_info=True)
>>             self.conn.rollback()
>>         else:
>>             self.conn.commit()
>>
>>     def __del__(self):
>>         self.close()
>>
>>     def close(self):
>>         if getattr(self, "_db", None):
>>             self._db.close()
>>             self._db = None
>>
>>     def get(self, query, *parameters):
>>         """Return the first row returned for the given query."""
>>         rows = self.query(query, *parameters)
>>         if not rows:
>>             return None
>>         elif len(rows) > 1:
>>             raise Exception("Multiple rows returned for Database.get()
>> query")
>>         else:
>>             return rows[0]
>>
>>     def query(self, query, *parameters):
>>         """Returns a row list for the given query and parameters."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             column_names = [d[0] for d in cursor.description]
>>             return [Row(itertools.izip(column_names, row)) for row in
>> cursor]
>>
>>     def execute(self, query, *parameters):
>>         """Executes the given query, returning the rowcount from the
>> query."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             return cursor.rowcount
>>
>>
>>
>>
>>
>> class Row(dict):
>>     def __getattr__(self, name):
>>         try:
>>             return self.get(name)
>>         except KeyError:
>>             raise AttributeError(name)
>>
>>
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug
>> http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
> 发言: [hidden email]
> 退订: [hidden email] (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> 强烈: 建议使用技巧: 如何有效地报告Bug
> http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

sunshine-10
In reply to this post by hejibo
js闭包是js语言的一个特性。很恶心的..

在 2011年12月12日 上午12:15,He Jibo <[hidden email]>写道:
js闭包,是不是就是不让别人看到你的js代码是什么?
---------------------------
He Jibo
Department of Psychology,
Beckman Institute for Advanced Science and Technology
University of Illinois, Urbana Champaign,
603 East Daniel St.,
Champaign, IL 61820
website: www.hejibo.info



2011/12/11 智障 <iasybvm@163.com>
 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

vicalloy
In reply to this post by hejibo
无力吐槽。
虽然大家都经历过青涩年华,不过还是想说问这个问题前最好先google。

在 2011-12-12,0:15,He Jibo <[hidden email]> 写道:

js闭包,是不是就是不让别人看到你的js代码是什么?
---------------------------
He Jibo
Department of Psychology,
Beckman Institute for Advanced Science and Technology
University of Illinois, Urbana Champaign,
603 East Daniel St.,
Champaign, IL 61820
website: www.hejibo.info


2011/12/11 智障 <iasybvm@163.com>
 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

马博文
In reply to this post by 智障
可以试一试thoughtworks,需要推荐的话可以帮忙

在 2011年12月12日 上午12:10,智障 <[hidden email]>写道:
 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

[CPyUG] Re: [OT]想去西安工作,有没有后门可走?

lee Alexander
来成都的话我这里有后门

On 12月12日, 上午12时44分, 马博文 <[hidden email]> wrote:

> 可以试一试thoughtworks,需要推荐的话可以帮忙
>
> 在 2011年12月12日 上午12:10,智障 <[hidden email]>写道:
>
>
>
>
>
>
>
> >  基本情况:
> > 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
> >    jquery正在使用中,离大牛还有一段距离。
>
> > 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>
> > 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>
> > 4附上一段代码,比着tornado的db模块写的。
>
> > #!/usr/bin/python
>
> > import psycopg2
> > import copy
> > import itertools
> > import logging
> > import contextlib
>
> > class Connection(object):
> >     def __init__(self, database, user="", password="", host="localhost"):
> >         self.conn = psycopg2.connect(database=database, user=user,
> >                                      password=password, host=host)
> >         self.host = host
> >     @contextlib.contextmanager
> >     def cursor(self):
> >         try:
> >             cursor = self.conn.cursor()
> >             yield cursor
> >         except Exception, e:
> >             print cursor.query
> >             cursor.close()
> >             logging.error("Database error on %s", self.host, exc_info=True)
> >             self.conn.rollback()
> >         else:
> >             self.conn.commit()
>
> >     def __del__(self):
> >         self.close()
>
> >     def close(self):
> >         if getattr(self, "_db", None):
> >             self._db.close()
> >             self._db = None
>
> >     def get(self, query, *parameters):
> >         """Return the first row returned for the given query."""
> >         rows = self.query(query, *parameters)
> >         if not rows:
> >             return None
> >         elif len(rows) > 1:
> >             raise Exception("Multiple rows returned for Database.get()
> > query")
> >         else:
> >             return rows[0]
>
> >     def query(self, query, *parameters):
> >         """Returns a row list for the given query and parameters."""
> >         with self.cursor() as cursor:
> >             cursor.execute(query, parameters)
> >             column_names = [d[0] for d in cursor.description]
> >             return [Row(itertools.izip(column_names, row)) for row in
> > cursor]
>
> >     def execute(self, query, *parameters):
> >         """Executes the given query, returning the rowcount from the
> > query."""
> >         with self.cursor() as cursor:
> >             cursor.execute(query, parameters)
> >             return cursor.rowcount
>
> > class Row(dict):
> >     def __getattr__(self, name):
> >         try:
> >             return self.get(name)
> >         except KeyError:
> >             raise AttributeError(name)
>
> >  --
> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > 规则:http://code.google.com/p/cpyug/wiki/PythonCn
> > 发言: [hidden email]
> > 退订: [hidden email] (向此发空信即退!)
> > 详情:http://code.google.com/p/cpyug/wiki/PythonCn
> > 严正: 理解列表! 智慧提问!http://wiki.woodpecker.org.cn/moin/AskForHelp
> > 强烈: 建议使用技巧: 如何有效地报告Bug
> >http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

pansz-2
In reply to this post by sunshine-10
无语中,这么说当下几乎所有的解释语言都被你一竿子打完了。。。甚至包括 python

2011/12/12 sunshine <[hidden email]>:
> js闭包是js语言的一个特性。很恶心的..

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

[CPyUG] Re: [OT]想去西安工作,有没有后门可走?

CJ-19
In reply to this post by sunshine-10
我感到无语,从Lisp开始,闭包就是函数式语言的一大特性,Python的一大缺点就是对闭包以及lambda的支持不完善

On Dec 12, 12:37 am, sunshine <[hidden email]> wrote:

> js闭包是js语言的一个特性。很恶心的..
>
> 在 2011年12月12日 上午12:15,He Jibo <[hidden email]>写道:
>
>
>
>
>
>
>
> > js闭包,是不是就是不让别人看到你的js代码是什么?
> > ---------------------------
> > He Jibo
> > Department of Psychology,
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, Urbana Champaign,
> > 603 East Daniel St.,
> > Champaign, IL 61820
> > website:www.hejibo.info
>
> > 2011/12/11 智障 <[hidden email]>
>
> >>  基本情况:
> >> 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
> >>    jquery正在使用中,离大牛还有一段距离。
>
> >> 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>
> >> 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>
> >> 4附上一段代码,比着tornado的db模块写的。
>
> >> #!/usr/bin/python
>
> >> import psycopg2
> >> import copy
> >> import itertools
> >> import logging
> >> import contextlib
>
> >> class Connection(object):
> >>     def __init__(self, database, user="", password="", host="localhost"):
> >>         self.conn = psycopg2.connect(database=database, user=user,
> >>                                      password=password, host=host)
> >>         self.host = host
> >>     @contextlib.contextmanager
> >>     def cursor(self):
> >>         try:
> >>             cursor = self.conn.cursor()
> >>             yield cursor
> >>         except Exception, e:
> >>             print cursor.query
> >>             cursor.close()
> >>             logging.error("Database error on %s", self.host,
> >> exc_info=True)
> >>             self.conn.rollback()
> >>         else:
> >>             self.conn.commit()
>
> >>     def __del__(self):
> >>         self.close()
>
> >>     def close(self):
> >>         if getattr(self, "_db", None):
> >>             self._db.close()
> >>             self._db = None
>
> >>     def get(self, query, *parameters):
> >>         """Return the first row returned for the given query."""
> >>         rows = self.query(query, *parameters)
> >>         if not rows:
> >>             return None
> >>         elif len(rows) > 1:
> >>             raise Exception("Multiple rows returned for Database.get()
> >> query")
> >>         else:
> >>             return rows[0]
>
> >>     def query(self, query, *parameters):
> >>         """Returns a row list for the given query and parameters."""
> >>         with self.cursor() as cursor:
> >>             cursor.execute(query, parameters)
> >>             column_names = [d[0] for d in cursor.description]
> >>             return [Row(itertools.izip(column_names, row)) for row in
> >> cursor]
>
> >>     def execute(self, query, *parameters):
> >>         """Executes the given query, returning the rowcount from the
> >> query."""
> >>         with self.cursor() as cursor:
> >>             cursor.execute(query, parameters)
> >>             return cursor.rowcount
>
> >> class Row(dict):
> >>     def __getattr__(self, name):
> >>         try:
> >>             return self.get(name)
> >>         except KeyError:
> >>             raise AttributeError(name)
>
> >>  --
> >> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> >> 规则:http://code.google.com/p/cpyug/wiki/PythonCn
> >> 发言: [hidden email]
> >> 退订: [hidden email] (向此发空信即退!)
> >> 详情:http://code.google.com/p/cpyug/wiki/PythonCn
> >> 严正: 理解列表! 智慧提问!http://wiki.woodpecker.org.cn/moin/AskForHelp
> >> 强烈: 建议使用技巧: 如何有效地报告Bug
> >>http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>
> >  --
> > 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> > 规则:http://code.google.com/p/cpyug/wiki/PythonCn
> > 发言: [hidden email]
> > 退订: [hidden email] (向此发空信即退!)
> > 详情:http://code.google.com/p/cpyug/wiki/PythonCn
> > 严正: 理解列表! 智慧提问!http://wiki.woodpecker.org.cn/moin/AskForHelp
> > 强烈: 建议使用技巧: 如何有效地报告Bug
> >http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

sbilly
In reply to this post by 智障
欢迎到 nsfocus.com 投递简历,我们有西安研发中心。
-- 
sbilly 
原始邮件
From: 智障
To: python-cn
Subject: [CPyUG] [OT]想去西安工作,有没有后门可走?
Date: 2011/12/12 0:10:39

 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

sgra ekim
为什么我觉得闭包是函数式编程里面最有趣的特性?

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re:Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

智障
In reply to this post by pansz-2
不知道Jquery怎么做的,反正我觉得解决attachEvent的触发对象问题,就得用闭包。

我通过创建一个闭包,用function.call把触发对象传递给处理函数。

有人说对象是穷人的闭包,闭包是穷人的对象。我还没理解。

在 2011-12-12 09:31:08,pansz <[hidden email]> 写道: >无语中,这么说当下几乎所有的解释语言都被你一竿子打完了。。。甚至包括 python > >2011/12/12 sunshine <[hidden email]>: >> js闭包是js语言的一个特性。很恶心的.. > >--  >来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表) >规则: http://code.google.com/p/cpyug/wiki/PythonCn >发言: [hidden email] >退订: [hidden email] (向此发空信即退!) >详情: http://code.google.com/p/cpyug/wiki/PythonCn >严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp >强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html


--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

flya flya
In reply to this post by sgra ekim
强烈推荐用coffeescript写javascript代码,最近把项目js代码都用coffee重写了,很爽,和写python代码差不多。除了少许语法不同,比如
for i in range(10):
用coffee就是:
for i in [0...10]
再也不用大括号了。

2011/12/12 Sgra Ekim <[hidden email]>:

> 为什么我觉得闭包是函数式编程里面最有趣的特性?
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
> 发言: [hidden email]
> 退订: [hidden email] (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> 强烈: 建议使用技巧: 如何有效地报告Bug
> http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

roc wong
In reply to this post by sbilly
西安的前端待遇怎么样?准备前往西安。

2011/12/12 sbilly <[hidden email]>
欢迎到 nsfocus.com 投递简历,我们有西安研发中心。
-- 
sbilly 
<form style="BORDER-LEFT:thin solid;PADDING-LEFT:6px;MARGIN-LEFT:4px" target="_blank" onsubmit="return window.confirm(&quot;You are submitting information to an external page. \nAre you sure?&quot;);">原始邮件
From: 智障
To: python-cn
Subject: [CPyUG] [OT]想去西安工作,有没有后门可走?
Date: 2011/12/12 0:10:39

 基本情况:
1 能胜任前端工作,懂js闭包,css1和基本的HTML。
   jquery正在使用中,离大牛还有一段距离。

2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。

3 Linux用户,从03年开始玩,知道memset,bzero。会用git。

4附上一段代码,比着tornado的db模块写的。

#!/usr/bin/python

import psycopg2
import copy
import itertools
import logging
import contextlib

class Connection(object):
    def __init__(self, database, user="", password="", host="localhost"):
        self.conn = psycopg2.connect(database=database, user=user,
                                     password=password, host=host)
        self.host = host
    @contextlib.contextmanager
    def cursor(self):
        try:
            cursor = self.conn.cursor()
            yield cursor
        except Exception, e:
            print cursor.query
            cursor.close()
            logging.error("Database error on %s", self.host, exc_info=True)
            self.conn.rollback()
        else:
            self.conn.commit()
   
    def __del__(self):
        self.close()

    def close(self):
        if getattr(self, "_db", None):
            self._db.close()
            self._db = None
   
    def get(self, query, *parameters):
        """Return the first row returned for the given query."""
        rows = self.query(query, *parameters)
        if not rows:
            return None
        elif len(rows) > 1:
            raise Exception("Multiple rows returned for Database.get() query")
        else:
            return rows[0]

    def query(self, query, *parameters):
        """Returns a row list for the given query and parameters."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            column_names = [d[0] for d in cursor.description]
            return [Row(itertools.izip(column_names, row)) for row in cursor]
   
    def execute(self, query, *parameters):
        """Executes the given query, returning the rowcount from the query."""
        with self.cursor() as cursor:
            cursor.execute(query, parameters)
            return cursor.rowcount

   



class Row(dict):
    def __getattr__(self, name):
        try:
            return self.get(name)
        except KeyError:
            raise AttributeError(name)



--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

Kermit Mei
On Wed, Dec 14, 2011 at 10:11:59AM +0800, roc wong wrote:
> 西安的前端待遇怎么样?准备前往西安。

现在在西安做嵌入式的拿到8k难不难?

B.R
Kermit

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

sj l
楼主 智障 其实是牛人,他是来卖萌的

2011/12/14 Kermit <[hidden email]>
On Wed, Dec 14, 2011 at 10:11:59AM +0800, roc wong wrote:
> 西安的前端待遇怎么样?准备前往西安。

现在在西安做嵌入式的拿到8k难不难?

B.R
Kermit

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re:Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

智障
楼上是谁啊?俺咋不知道俺是高手啊?
帮忙找工作不?

在 2011-12-15 13:09:31,"sj l" <[hidden email]> 写道:
楼主 智障 其实是牛人,他是来卖萌的

2011/12/14 Kermit <[hidden email]>
On Wed, Dec 14, 2011 at 10:11:59AM +0800, roc wong wrote:
> 西安的前端待遇怎么样?准备前往西安。

现在在西安做嵌入式的拿到8k难不难?

B.R
Kermit

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: python-cn+[hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html


--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

郁夫
In reply to this post by roc wong

为何去西安?西安的it一般。

Send from my Droid3!
在 2011-12-14 上午10:12,"roc wong" <[hidden email]>写道:
>
> 西安的前端待遇怎么样?准备前往西安。
>
>
> 2011/12/12 sbilly <[hidden email]>
>>
>> 欢迎到 nsfocus.com 投递简历,我们有西安研发中心。
>>
>> --
>> sbilly
>>
>> 原始邮件
>> From:
>> 智障
>> To:
>> python-cn
>> Subject:
>> [CPyUG] [OT]想去西安工作,有没有后门可走?
>> Date:
>> 2011/12/12 0:10:39
>>
>>  基本情况:
>> 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
>>    jquery正在使用中,离大牛还有一段距离。
>>
>> 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>>
>> 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>>
>> 4附上一段代码,比着tornado的db模块写的。
>>
>> #!/usr/bin/python
>>
>> import psycopg2
>> import copy
>> import itertools
>> import logging
>> import contextlib
>>
>> class Connection(object):
>>     def __init__(self, database, user="", password="", host="localhost"):
>>         self.conn = psycopg2.connect(database=database, user=user,
>>                                      password=password, host=host)
>>         self.host = host
>>     @contextlib.contextmanager
>>     def cursor(self):
>>         try:
>>             cursor = self.conn.cursor()
>>             yield cursor
>>         except Exception, e:
>>             print cursor.query
>>             cursor.close()
>>             logging.error("Database error on %s", self.host, exc_info=True)
>>             self.conn.rollback()
>>         else:
>>             self.conn.commit()
>>    
>>     def __del__(self):
>>         self.close()
>>
>>     def close(self):
>>         if getattr(self, "_db", None):
>>             self._db.close()
>>             self._db = None
>>    
>>     def get(self, query, *parameters):
>>         """Return the first row returned for the given query."""
>>         rows = self.query(query, *parameters)
>>         if not rows:
>>             return None
>>         elif len(rows) > 1:
>>             raise Exception("Multiple rows returned for Database.get() query")
>>         else:
>>             return rows[0]
>>
>>     def query(self, query, *parameters):
>>         """Returns a row list for the given query and parameters."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             column_names = [d[0] for d in cursor.description]
>>             return [Row(itertools.izip(column_names, row)) for row in cursor]
>>    
>>     def execute(self, query, *parameters):
>>         """Executes the given query, returning the rowcount from the query."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             return cursor.rowcount
>>
>>    
>>
>>
>>
>> class Row(dict):
>>     def __getattr__(self, name):
>>         try:
>>             return self.get(name)
>>         except KeyError:
>>             raise AttributeError(name)
>>
>>
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
> 发言: [hidden email]
> 退订: [hidden email] (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

郁夫

Send from my Droid3!

在 2011-12-15 下午8:13,"郁夫" <[hidden email]>写道:

为何去西安?西安的it一般。

Send from my Droid3!
在 2011-12-14 上午10:12,"roc wong" <[hidden email]>写道:
>
> 西安的前端待遇怎么样?准备前往西安。
>
>
> 2011/12/12 sbilly <[hidden email]>
>>
>> 欢迎到 nsfocus.com 投递简历,我们有西安研发中心。
>>
>> --
>> sbilly
>>
>> 原始邮件
>> From:
>> 智障
>> To:
>> python-cn
>> Subject:
>> [CPyUG] [OT]想去西安工作,有没有后门可走?
>> Date:
>> 2011/12/12 0:10:39
>>
>>  基本情况:
>> 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
>>    jquery正在使用中,离大牛还有一段距离。
>>
>> 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>>
>> 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>>
>> 4附上一段代码,比着tornado的db模块写的。
>>
>> #!/usr/bin/python
>>
>> import psycopg2
>> import copy
>> import itertools
>> import logging
>> import contextlib
>>
>> class Connection(object):
>>     def __init__(self, database, user="", password="", host="localhost"):
>>         self.conn = psycopg2.connect(database=database, user=user,
>>                                      password=password, host=host)
>>         self.host = host
>>     @contextlib.contextmanager
>>     def cursor(self):
>>         try:
>>             cursor = self.conn.cursor()
>>             yield cursor
>>         except Exception, e:
>>             print cursor.query
>>             cursor.close()
>>             logging.error("Database error on %s", self.host, exc_info=True)
>>             self.conn.rollback()
>>         else:
>>             self.conn.commit()
>>    
>>     def __del__(self):
>>         self.close()
>>
>>     def close(self):
>>         if getattr(self, "_db", None):
>>             self._db.close()
>>             self._db = None
>>    
>>     def get(self, query, *parameters):
>>         """Return the first row returned for the given query."""
>>         rows = self.query(query, *parameters)
>>         if not rows:
>>             return None
>>         elif len(rows) > 1:
>>             raise Exception("Multiple rows returned for Database.get() query")
>>         else:
>>             return rows[0]
>>
>>     def query(self, query, *parameters):
>>         """Returns a row list for the given query and parameters."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             column_names = [d[0] for d in cursor.description]
>>             return [Row(itertools.izip(column_names, row)) for row in cursor]
>>    
>>     def execute(self, query, *parameters):
>>         """Executes the given query, returning the rowcount from the query."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             return cursor.rowcount
>>
>>    
>>
>>
>>
>> class Row(dict):
>>     def __getattr__(self, name):
>>         try:
>>             return self.get(name)
>>         except KeyError:
>>             raise AttributeError(name)
>>
>>
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
> 发言: [hidden email]
> 退订: [hidden email] (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
Reply | Threaded
Open this post in threaded view
|

Re:Re: [CPyUG] [OT]想去西安工作,有没有后门可走?

智障
喜欢西安这个城市。汉唐故都啊。

在 2011-12-15 20:13:53,"郁夫" <[hidden email]> 写道:

Send from my Droid3!

在 2011-12-15 下午8:13,"郁夫" <[hidden email]>写道:

为何去西安?西安的it一般。

Send from my Droid3!
在 2011-12-14 上午10:12,"roc wong" <[hidden email]>写道:
>
> 西安的前端待遇怎么样?准备前往西安。
>
>
> 2011/12/12 sbilly <[hidden email]>
>>
>> 欢迎到 nsfocus.com 投递简历,我们有西安研发中心。
>>
>> --
>> sbilly
>>
>> 原始邮件
>> From:
>> 智障
>> To:
>> python-cn
>> Subject:
>> [CPyUG] [OT]想去西安工作,有没有后门可走?
>> Date:
>> 2011/12/12 0:10:39
>>
>>  基本情况:
>> 1 能胜任前端工作,懂js闭包,css1和基本的HTML。
>>    jquery正在使用中,离大牛还有一段距离。
>>
>> 2 Python懂协程,会用Django,会用Tornado,会用PostgreSQL(好像现在用MySQL的比较多)。
>>
>> 3 Linux用户,从03年开始玩,知道memset,bzero。会用git。
>>
>> 4附上一段代码,比着tornado的db模块写的。
>>
>> #!/usr/bin/python
>>
>> import psycopg2
>> import copy
>> import itertools
>> import logging
>> import contextlib
>>
>> class Connection(object):
>>     def __init__(self, database, user="", password="", host="localhost"):
>>         self.conn = psycopg2.connect(database=database, user=user,
>>                                      password=password, host=host)
>>         self.host = host
>>     @contextlib.contextmanager
>>     def cursor(self):
>>         try:
>>             cursor = self.conn.cursor()
>>             yield cursor
>>         except Exception, e:
>>             print cursor.query
>>             cursor.close()
>>             logging.error("Database error on %s", self.host, exc_info=True)
>>             self.conn.rollback()
>>         else:
>>             self.conn.commit()
>>    
>>     def __del__(self):
>>         self.close()
>>
>>     def close(self):
>>         if getattr(self, "_db", None):
>>             self._db.close()
>>             self._db = None
>>    
>>     def get(self, query, *parameters):
>>         """Return the first row returned for the given query."""
>>         rows = self.query(query, *parameters)
>>         if not rows:
>>             return None
>>         elif len(rows) > 1:
>>             raise Exception("Multiple rows returned for Database.get() query")
>>         else:
>>             return rows[0]
>>
>>     def query(self, query, *parameters):
>>         """Returns a row list for the given query and parameters."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             column_names = [d[0] for d in cursor.description]
>>             return [Row(itertools.izip(column_names, row)) for row in cursor]
>>    
>>     def execute(self, query, *parameters):
>>         """Executes the given query, returning the rowcount from the query."""
>>         with self.cursor() as cursor:
>>             cursor.execute(query, parameters)
>>             return cursor.rowcount
>>
>>    
>>
>>
>>
>> class Row(dict):
>>     def __getattr__(self, name):
>>         try:
>>             return self.get(name)
>>         except KeyError:
>>             raise AttributeError(name)
>>
>>
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>>
>> --
>> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
>> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
>> 发言: [hidden email]
>> 退订: [hidden email] (向此发空信即退!)
>> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
>> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
>> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
>
>
> --
> 来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
> 规则: http://code.google.com/p/cpyug/wiki/PythonCn
> 发言: [hidden email]
> 退订: [hidden email] (向此发空信即退!)
> 详情: http://code.google.com/p/cpyug/wiki/PythonCn
> 严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
> 强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html

--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: python-cn+[hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html


--
来自: python-cn`CPyUG`华蟒用户组(中文Python技术邮件列表)
规则: http://code.google.com/p/cpyug/wiki/PythonCn
发言: [hidden email]
退订: [hidden email] (向此发空信即退!)
详情: http://code.google.com/p/cpyug/wiki/PythonCn
严正: 理解列表! 智慧提问! http://wiki.woodpecker.org.cn/moin/AskForHelp
强烈: 建议使用技巧: 如何有效地报告Bug http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html
12