Algorithm: Practical Set Reconciliation

《Practical Set Reconciliation》
Yaron Minsky Cornell University https://blog.janestreet.com/author/yminsky/
Ari Trachtenberg Boston University

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.456.7200&rep=rep1&type=pdf

def set_reconcile(src_seq, dst_seq):
    "Return required operations to mutate src_seq into dst_seq"
    src_set= set(src_seq) # no-op if already of type set
    dst_set= set(dst_seq) # ditto

    for item in src_set - dst_set:
        yield 'delete', item

    for item in dst_set - src_set:
        yield 'create', item

for i in set_reconcile([1,2,3,4], [2,3,4,5]):
    print i

$ python set_reconcile.py 
('delete', 1)
('create', 5)

[转发] 招聘 | 40K – 60K 招资深架构师、资深软件工程师

2017-05-11 CSDN企业招聘

北京涛思数据科技有限公司

涛思数据(TAOS Data)专注实时大数据的高效采集、存储、查询和分析。其自主开发的核心引擎写入数据的速度比普通数据库快五倍以上,查询速度快十倍以上。技术能广泛运用于物联网和金融行业,能大幅提升大数据系统的性能和容量,并降低运营成本。

2017年5月,涛思数据获得知名天使投资人薛蛮子和明势资本的投资。核心团队成员有多年在通讯设备、数据库、存储、大数据等领域的研发经验,创始人陶建辉曾成功创办“和信”与“快乐妈咪”两家高科技企业。

Continue reading “[转发] 招聘 | 40K – 60K 招资深架构师、资深软件工程师”

(Python Author) Guido van Rossum on finding his way

Guido van Rossum is the creator and benevolent dictator for life (a.k.a. BDFL) of the Python programming language. Here he reflects on his path and shares what he’s been working on since joining Dropbox. Read on for this and a hint at what’s next for Dropbox, for Python, and for the BDFL himself.

You were an electronics hobbyist before becoming a programmer. How did you get started in electronics?

Okay, we’re going waaaay back. I don’t know exactly why I got into electronics as a kid. I remember that from the last grade in elementary school and probably through my second year in university, electronics kits and my own designs were one of my big passions.

It wasn’t always an easy path. In elementary school, I took one of the first projects I built into class as a show and tell project. There was no one who understood what it was or why it was interesting or cared. It’s a very vague memory. I just know that I took it in, and it fell flat.

Was there a time when you eventually found your people?

In high school, I hung out with a few other guys who had similar hobbies. We were all the geekiest kids in class.

I remember our physics teacher really encouraging us. The three of us worked together to build a large electronic device that was then used in demonstrations in front of the classroom. That was very satisfying.

Throughout high school, I had a very vague idea of what kinds of careers would be open to me. My general idea was that I was good at both sciences and languages and not so good in social areas. I ended up choosing mathematics.

How did you go from electronics to programming? Continue reading “(Python Author) Guido van Rossum on finding his way”

编程入门学习 CodeMonkey.co.il

非常简单的编程学习网站: http://www.codemonkey.co.il/,通过三四个语法控制猴子和乌龟移动吃光所有香蕉,总共30关。很有趣,又能了解编程的一些基本概念,特别适合没有太多编程基础的人。

step用来移动对象,默认移动猴子。 “turtle.step 10” 用来移动乌龟10步。
turn 用于转动方向,”turn left”:向左移动90度,”turn -90″: 顺时针移动90度,“turnTo bridge”:移动到bridge所在方向。
3.times -> 实现循环

要完成任务,需要躲避障碍,搭乘乌龟在河中移动,其中的距离可以使用尺子在编程时度量到。

Screenshot from 2014-08-01 17:56:27 Screenshot from 2014-08-01 17:40:28 Screenshot from 2014-08-01 17:33:19