Skip to content

Instantly share code, notes, and snippets.

View rowillia's full-sized avatar

Roy Williams rowillia

  • Lyft
  • San Francisco, CA
View GitHub Profile
#!/bin/bash
VERSION_SHAS="
3.6.2;e1a36bfffdd1d3a780b1825daf16e56c
3.6.1;2d0fc9f3a5940707590e07f03ecb08b9
3.6.0;3f7062ccf8be76491884d0e47ac8b251
3.5.3;6192f0e45f02575590760e68c621a488
3.5.2;3fe8434643a78630c61c6464fe2e7e72
3.5.1;be78e48cdfc1a7ad90efff146dce6cfe
3.5.0;a56c0c0b45d75a0ec9c6dee933c41c36
"
@rowillia
rowillia / python3kflag.md
Last active December 7, 2016 21:45
The Magic of the -3 Flag in Python 2

The Magic of the -3 Flag in Python 2

Porting code from Python 2 to Python 3 can be a daunting task. Tools like Futureize or Modernize can do most of the mechanical work for you, and Pylint can find obvious problems with code that's meant to be 2and3 compatible. You should absolutely be using these tools as they identify the lion's share of compatibility problems. Thanks to this work, it's really never been easier to port a large codebase to Python 3.

Even with these tools, however, porting code in a way that ensures identical behavior in Python 2 and Python 3 is tough. Python is a highly dynamic language and there is a huge breadth of changes between Python 2 and Python 3. Also, while we'd all love to work in code bases with 100% unit test coverage, the reality is unfortunately often very different. Given this, it's hard if not impossible for a static analysis tool t

2016-04-19T19:01:24.92683 9619.717: [GC [PSYoungGen: 102480K->2528K(102400K)] 117610K->17714K(451584K), 0.0025020 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2016-04-19T19:01:24.92971 Apr 19, 2016 7:01:24 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run
2016-04-19T19:01:24.92972 SEVERE: I/O error in channel channel
2016-04-19T19:01:24.92972 java.net.SocketTimeoutException: Read timed out
2016-04-19T19:01:24.92973 at java.net.SocketInputStream.socketRead0(Native Method)
2016-04-19T19:01:24.92973 at java.net.SocketInputStream.read(SocketInputStream.java:152)
2016-04-19T19:01:24.92973 at java.net.SocketInputStream.read(SocketInputStream.java:122)
2016-04-19T19:01:24.92974 at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
2016-04-19T19:01:24.92974 at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
2016-04-19T19:01:24.92974 at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82)
@rowillia
rowillia / -
Created September 1, 2015 17:56
package infer_test;
public class Test {
public static final String[] PREFIXES = {"A", "B"};
private String currentValue;
private String newerValue;
private static class Strings {
public static boolean isNullOrBlank(String string) {