I hereby claim:
- I am powersjcb on github.
- I am powersjcb (https://keybase.io/powersjcb) on keybase.
- I have a public key whose fingerprint is 6DBC 3C75 6FC1 DB92 24B6 3319 004D E36A BCD3 2E39
To claim this, I am signing this object:
# Ref: https://github.com/eclipse/paho.mqtt.python#getting-started | |
from paho.mqtt.client import ssl | |
import paho.mqtt.client as mqtt | |
client = mqtt.Client() | |
def on_message(*args): | |
print(args) | |
def on_connect(*args): |
I hereby claim:
To claim this, I am signing this object:
import json | |
from pprint import pprint | |
from datetime import datetime | |
def load_json_data(path): | |
start_time = datetime.now() | |
f = open(path, 'r') | |
# stripping out data contaminants from Crunchbase | |
first_line = f.readline() |
# 1. Create a Hash with keys of directions that have been checked for a match | |
class Piece | |
@checked_directions = {:horizontal => false, :vertical => false, :left_diag => false, :right_diag => false} | |
end | |
# 2. Iterate through each element (as was previously implemented) | |
# DUP All the pieces for this next step O(n^2) where n is the width of the grid. | |
dup_pieces = pieces.map {|el| el.dup} | |
pieces.any? { |piece| piece.winning? } |