Skip to content

Instantly share code, notes, and snippets.

const changeValue = (element, value) => {
const event = new Event('input', { bubbles: true })
element.value = value
element.dispatchEvent(event)
}
def deco(func):
def wrapped(*args, **kwargs):
print('Eexecuting decorator')
return func(*args, **kwargs)
return wrapped
class Foo(object):
def foo(self):
return 42

Keybase proof

I hereby claim:

  • I am marigold on github.
  • I am mojmir (https://keybase.io/mojmir) on keybase.
  • I have a public key whose fingerprint is D219 DCDB 52D4 5428 B526 DEAE 6B5C 7249 B71C 3477

To claim this, I am signing this object:

B = B_rdd.collect()
rdds = []
CHUNKSIZE = 100
for i in range(int(math.ceil(len(B) / float(CHUNKSIZE)))):
B_bc = sc.broadcast(B[i*CHUNKSIZE:(i+1)*CHUNKSIZE])
rdds.append(A.flatMap(lambda a: [foo(a, b) for b in B_bc.value]))
final_rdd = sc.union(rdds)