Install the Rails gem if you haven't done so before
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_/﹋\_ | |
(҂`_´) | |
<,︻╦╤─ ҉ - - Y O U G O T H A C K E D | |
_/﹋\_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public_identifier": "eden-marco", | |
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/eden-marco/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240609%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240609T145729Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2773956fb88e429ba25214cd60a8fd40c0b6c26e3dc606a2b61dc4aea384b8b5", | |
"background_cover_image_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/eden-marco/cover?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240609%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240609T145729Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=cc9166ff7356a3805f758246a1b989a0229c7eddd9d207a9d573a7c686fc8427", | |
"first_name": "Eden", | |
"last_name": "Marco", | |
"full_name": "Eden Marco", | |
"follower_count": 4414, | |
"occupation": "LLM Specialist, Customer Engineering - Google Cloud at Google", | |
"headline": "LLMs @ Google |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis | |
import sys | |
host = sys.argv[1] | |
room = sys.argv[2] | |
print "-- connect to redis" | |
client = redis.Redis(host=host) | |
pubsub = client.pubsub() | |
pubsub.subscribe(room) | |
print "-- listen to {}".format(room) |
(the video is here, the original talk notes are here)
At least one of those four patterns are in play when you talk about "event-driven" architectures:
- Event Notification: components communicating via events
- Event-carried State Transfer: allowing components to access data without calling the source
- Event Sourcing: using an event log as the primary record for a system
- CQRS: having a separate component for updating a store from any readers of the store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function, unicode_literals | |
from tensorflow.keras import layers | |
try: | |
# %tensorflow_version only exists in Colab. | |
%tensorflow_version 2.x | |
except Exception: | |
pass | |
import tensorflow as tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ s3cmd get s3://us-east-1.elasticmapreduce/libs/s3distcp/1.latest/s3distcp.jar | |
$ hadoop jar ./s3distcp.jar --src s3a://<bucket>/input/ --dest=s3a://<bucket>/output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import os | |
import time | |
""" | |
Writing from Spark to S3 is ridiculously slow. This is because S3 is an object | |
store and not a file system. Because of consistency model of S3, when writing | |
Parquet (or ORC) files from Spark. Data will be stored to a temporary destination | |
then renamed when the job is successful. As S3 is an object store, renaming files | |
is very expensive (complete rewrite). The Spark job will only terminate when all |
NewerOlder