Profile

Cover photo
Peter Shinners
168 followers|132,315 views
AboutPostsPhotosYouTube+1'sReviews

Stream

Peter Shinners

Shared publicly  - 
 
Good overview of the latest patch and hero standing. Seems to line up with my experience.
Updated 5/14/2015 Having a short but storied history, Heroes of the Storm is Blizzard's attempt a...
1
Add a comment...

Peter Shinners

Shared publicly  - 
 
Stuff like this makes me even more excited about work.
 ·  Translate
1
Add a comment...

Peter Shinners

Shared publicly  - 
 
So hot right now! Well, so hot next year.
The star and Owen Wilson confirm the long-awaited sequel will be out next year
2
Add a comment...

Peter Shinners

Tips & Tricks  - 
 
What is the quickest way to count the items in an iterator, using pure Python?

I spent some time thinking of various techniques and benchmarking them. It turns out the simplest is the fastest. Copy the iterator into a list and see how big the list is. I find that surprising since the data must be copied into a flat array that must occasionally be resized.

The fastest solution I like is to copy the iterator into a fixed size list, until the iterator is empty. That is about 3x faster than a simple for loop.

Here's a link to my data and a basic description of the different techniques. I'd love for someone to surprise me with something new and novel!
The fastest way to walk through all elements of an iterator is collections.deque(iter, maxlen=0) . The deque works like a cyclical buffer when given a maximum length. And with 0 actual elements it is very fast at collecting the data. Unfortunately this does not tell us much about what happened ...
5
Jacob Aimino's profile photoJason DeRose's profile photoPeter Shinners's profile photoRobert Lauer's profile photo
5 comments
 
You use up the iterator though which can be annoying 
Add a comment...

Peter Shinners

Questions  - 
 
Api design:
The opposite of 'append' is 'prepend'. So the opposite of 'extend' is 'pretend'? OK, that is funny but terrible, but what is the right method name?
4
Just In Words's profile photoDan Pettersson's profile photoPeter Shinners's profile photoMarc Poulin's profile photo
7 comments
 
+Peter Shinners 
precede
verb (used with object), preceded, preceding.
1. to go before, as in place, order, rank, importance, or time.

http://dictionary.reference.com/browse/precede
Add a comment...

Peter Shinners

Shared publicly  - 
 
This stage was stunning to see in real life at the SC2 WCS world championships. Video shows a light look behind the scenes.
1
Add a comment...

Peter Shinners

Shared publicly  - 
 
From the archives. A convenient list of people that are awesome.
4
1
Rob Bredow's profile photoDaniel Kramer's profile photo
 
Those are some great memories. 
Add a comment...
Have him in circles
168 people
Alan Dunn's profile photo
Emanuel Druckmann's profile photo
Jason Iversen's profile photo
Steven Shapiro's profile photo
Patrick Shyu's profile photo
Rene Dudfield's profile photo
Roger Maddy's profile photo
Ayon Banerjee's profile photo
Salvador Arditti's profile photo

Communities

5 communities

Peter Shinners

Shared publicly  - 
 
This is out, imho you need this.
DECEPTIVELY SIMPLE. INSANELY FUN.Blackrock Mountain: A Hearthstone Adventur...
2
Add a comment...

Peter Shinners

Shared publicly  - 
 
I don't often play the Hearthstone Arena. Tricky choice here between Cain and Troggzor! I ended up picking Cairn Bloodhoof! Any fans of the Earthinator out there?
1
Add a comment...
 
Python 2.6 added the `any` and `all` functions. I love these two functions, but I think they could be improved.

My biggest problem is that they return booleans. Unlike the flexibility I get from the logical `and` and `or` operators, which result in the last value that was evaluated.

This change alone would make `any` and `all` more useful. For example, if I had a list of strings and I wanted to find a string that was non-empty, I could use "any(my_sparse_strings)" to fetch it. This becomes the same as doing "my_sparse_strings[0] or my_sparse_strings[1] or .. my_sparse_strings[n]".

They become more useful if we also add a "key" argument to transform the values. This might be just as useful as the key function in `sort`, `min`, and `max`. I'm still not sure about this because you then cannot know if the value returned met or did not meet the criteria, without checking it again.

Lastly, did you know `all` generates a `True` for an empty list and `any` generates `False` for an empty list? It seems like it would be convenient to control the value when given an empty iteratable.

Well, I took a stab at improving both of these in my yter library. See the `yall` and `yany` methods. I was highly tempted to name them `yand` and `yor`, but I steered towards naming them after the existing Python functions.
4
1
Marc Rintsch's profile photoPhillip Adkins's profile photoPeter Shinners's profile photoSerge K's profile photo
9 comments
 
I really dislike the conditional "else" operator. But I use the logical "and" and "or" operators all the time. So often I frequently want to pass a list of values into them. 
Add a comment...
 
Python classes make terrible iterators. (Because performance)

I've been writing a few iterators and doing some simple benchmarking. I was suprised to see that python classes are nearly an order of magnitude slower than a generator.

I've documented my findings and shared them on my new, barely interesting library of iterators.

TLDR, use combinations of itertools if at all possible, otherwise go for a generator, and never build a class with a next method!
Creating your own Python iterators can cost you in performance where you were not expecting. A Python class that iterates values is orders of magnitude slower than the fastest options. (Order of magnitude defined as 10x slower, an entire decimal place). One of the simplest test cases I can think ...
9
4
Matan Weissbuch's profile photoSerge K's profile photoJun Wang's profile photofranck ebel's profile photo
7 comments
 
+Marek Lewandowski  Your version runs at the same speed as the original (at least with Python 3). Indexing a list in Python has never been, or never will be a slow operation.

If we change your version to "it = iter(i)" then that improves performance to only 3x slower than a generator! I'm still convinced the conclusion is correct.
Add a comment...

Peter Shinners

Shared publicly  - 
 
Great day to be a Blizzard fan boy. Blizzcon opening ceremonies will blow more than the usual number of minds!
Free stream at 11AM. 
Live Stream - BlizzCon
1
Lucas Miller's profile photoPeter Shinners's profile photo
2 comments
 
Or it is time to shift this conference into overdrive!
Add a comment...
Story
Tagline
That python for movies guy
Basic Information
Gender
Male
Apps with Google+ Sign-in
Peter Shinners's +1's are the things they like, agree with, or want to recommend.
Hearthstone Heroes of Warcraft
market.android.com

Hearthstone only supports tablets with screens that are 6 inches and larger at this time.DECEPTIVELY SIMPLE. INSANELY FUN. Pick up your card

PyPy Status Blog: PyGame CFFI
morepypy.blogspot.com

One of the RaspberryPi's goals is to be a fun toolkit for school children (and adults!) to learn programming and electronics with. Python an

Google+
market.android.com

Real-life sharing rethought for the web, wherever you are. Google+ for mobile makes sharing the right things with the right people a lot sim

Pandora Radio - Listen to Free Internet Radio, Find New Music
www.pandora.com

Pandora radio is the personalized internet radio service that helps you find new music based on your old and current favorites. Create custo

Alembic
alembic.io

INTRODUCTION. Alembic is an open computer graphics interchange framework. Alembic distills complex, animated scenes into a non-procedural, a

Google Search
market.android.com

The fastest, easiest way to find what you need on the web and on your device.Google Search app for Android: The fastest, easiest way to find

News - pygame - python game development
www.pygame.org

pygame. News. About. Screenshots. Downloads. Documentation. Tutorials. Pygame FAQ. Help (irc, lists). Bugs & Patches. Mercurial. Links.

Paris 1900-2013 en photos : grimpez dans notre fabuleuse machine à remon...
www.rue89.com

Dix autochromes, commandés par un riche banquier, de la capitale au siècle dernier... en face de dix photos, prises par nous cette année. Ru

The Switch: Python to Node.js | Paul's Journal
feeds.dzone.com

The Switch: Python to Node.js. Posted on December 18, 2011 by Paul Querna. In my previous post, I glossed over our team switching from Pytho

PyCharm 2.0 beta 2 | JetBrains PyCharm Blog
feedproxy.google.com

PyCharm 2.0 beta 2. Posted on November 30, 2011 by Dmitry Jemerov. We're happy to announce the update for the Beta release of PyCharm 2.

PyCharm 2.7 is available: back to core Python | JetBrains PyCharm Blog
feedproxy.google.com

We've released PyCharm 2.7, a big update for our Python and Django IDE. The main focus of this update is better Python coding experience. We

Graydon’s work on Mozilla » Blog Archive » Rust 0.1 release
blog.mozilla.com

Another six months and we have our first release. Rust is now at a point where we'd like to invite people to write code in it. It's

PyCharm 2.5 Released! A Really Environment Friendly IDE | JetBrains PyCh...
feedproxy.google.com

Hurray! We made it! PyCharm 2.5 is officially available. PyCharm has been green since its version one, but this update makes it truly enviro

Portal 2 is Games Radar's Most Favorite 2011 Video Game
feeds.gawker.com

Their readers thought the best video game of 2011 was Skyrim, but the editors of Games Radar have picked Portal 2. It's their top game of th

4K Download | Free, useful applications for all modern plaforms
www.4kdownload.com

Free, useful applications for all modern platforms. Download video and audio from YouTube or photos from Instagram, make slideshows. And muc

YouTube - Brave Trailer
www.youtube.com

Utwórz kontoZaloguj się. Home. PrzeglądajPrześlij. Witaj, to nie jest przerwa na reklamę. Używasz starej przeglądarki, której serwis YouTube

Installing Amazon MP3 Downloader on Ubuntu 11.04 | dgf64art
www.dgf64art.com

Installing Amazon MP3 Downloader on Ubuntu 11.04. Posted by dgf64 on Jul 5, 2011 in Application, Main Topics, Tutorials | 4 comments. Not ev

Togepi sings Mario Bros
www.youtube.com

Calopsita linda. Meu twitter http://twitter.com/A_Resposta Pra quem acha que é fake (for those who think it's fake): http://www.youtube.com/

There are shade covers over all the equipment and tables. Don't be fooled by Woodfield Park which is adjacent to this one. A paved waking path connects them, but it is a mini-hike.
Public - a year ago
reviewed a year ago
34 reviews
Map
Map
Map